:root {
  color-scheme: light;
  --ink: #143226;
  --ink-soft: #315246;
  --muted: #6e7f75;
  --quiet: #98a69c;
  --line: #dfe9df;
  --line-strong: #c8d9cc;
  --page: #f2f1e8;
  --app: #fbfaf3;
  --surface: #fffdf7;
  --surface-warm: #fff8eb;
  --soft: #eef6ed;
  --sage: #7aa783;
  --sage-deep: #45765d;
  --teal: #0d6c61;
  --teal-strong: #084f49;
  --mint: #74c59a;
  --mint-soft: #e7f5ea;
  --amber: #d48b2a;
  --amber-soft: #fff0d4;
  --coral: #df7a55;
  --coral-soft: #fff0e9;
  --blue: #6b9088;
  --blue-soft: #eef6f3;
  --shadow: 0 24px 70px rgba(63, 87, 74, 0.18);
  --shadow-soft: 0 12px 34px rgba(74, 101, 85, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  background:
    linear-gradient(135deg, rgba(122, 167, 131, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(212, 139, 42, 0.12), transparent 46%),
    linear-gradient(180deg, #f7f5ed, var(--page));
  color: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}

button,
input {
  font: inherit;
}

button,
a,
summary,
[role="button"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus,
a:focus,
summary:focus,
input:focus,
select:focus,
textarea:focus,
[role="button"]:focus {
  outline: none;
}

.app-frame {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 253, 242, 0.18), rgba(242, 249, 232, 0.16)),
    url("docs/assets/glucolit-v3-nature-bg.png") top center / 100% auto no-repeat,
    linear-gradient(180deg, #fbfaf0 0, #eaf5dc 76%, #c5e3ce 100%) !important;
  color: #083e31 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", STSong, serif !important;
  box-shadow: var(--shadow);
}

.app-frame::before {
  display: none !important;
}

.app-header {
  position: relative;
  z-index: 2;
  padding: 32px 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent !important;
  border-bottom: none !important;
}
  backdrop-filter: blur(18px);
  z-index: 2;
}

.app-header::after {
  content: "";
  position: absolute;
  right: 88px;
  bottom: 10px;
  width: 46px;
  height: 32px;
  border-right: 1px solid rgba(69, 118, 93, 0.28);
  border-bottom: 1px solid rgba(69, 118, 93, 0.22);
  border-radius: 0 0 26px 0;
  transform: rotate(-12deg);
  pointer-events: none;
}

.app-header h1 {
  margin: 3px 0 0;
  font-family: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  font-size: 1.72rem;
  line-height: 1;
}

.app-header h1::before {
  display: none !important;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.screen {
  position: relative;
  z-index: 1;
  height: calc(100vh - 86px);
  overflow: auto;
  padding: 14px 16px 102px;
  scrollbar-color: rgba(122, 167, 131, 0.55) transparent;
}

.stack {
  display: grid;
  gap: 14px;
}

.card,
.analysis-card,
.action-card,
.article-card {
  position: relative;
  border: 1px solid rgba(200, 217, 204, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow-soft);
}

.card {
  padding: 16px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(122, 167, 131, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(231, 245, 234, 0.94), rgba(255, 253, 247, 0.94) 58%, rgba(255, 240, 212, 0.58)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-card::after {
  display: none !important;
}

.hero-card h2,
.card h2,
.section-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.focus-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(122, 167, 131, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 253, 247, 0.98), rgba(241, 248, 235, 0.96) 62%, rgba(255, 247, 231, 0.94)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(66, 93, 73, 0.16);
}

.focus-card::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 8px;
  width: 110px;
  height: 120px;
  opacity: 0.14;
  background:
    linear-gradient(88deg, transparent 48%, var(--sage-deep) 48% 51%, transparent 51%),
    linear-gradient(132deg, transparent 0 44%, var(--sage) 44% 50%, transparent 50%),
    linear-gradient(42deg, transparent 0 45%, var(--sage) 45% 51%, transparent 51%);
  transform: rotate(7deg);
  pointer-events: none;
}

.focus-card .eyebrow {
  color: var(--sage-deep);
}

.focus-card .status-pill {
  border-color: rgba(116, 197, 154, 0.45);
  background: rgba(231, 245, 234, 0.88);
  color: var(--teal-strong);
}

.wellness-score {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.score-ring {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 999px;
  background:
    conic-gradient(var(--sage) 0 82%, rgba(223, 233, 223, 0.88) 82% 100%);
  box-shadow: inset 0 0 0 8px rgba(255, 253, 247, 0.94), 0 12px 24px rgba(69, 118, 93, 0.16);
}

.score-ring strong {
  display: block;
  color: var(--teal-strong);
  font-size: 1.72rem;
  line-height: 1;
}

.score-ring span {
  margin-top: 3px;
  color: var(--sage-deep);
  font-size: 0.72rem;
  font-weight: 800;
}

.focus-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.54;
}

.soft-checks {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.soft-checks span {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.soft-checks span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
}

.focus-chart {
  height: 112px;
  margin: 12px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(200, 217, 204, 0.86);
  border-radius: 18px;
  background:
    linear-gradient(to bottom, transparent 31%, rgba(69, 118, 93, 0.11) 31% 32%, transparent 32% 66%, rgba(69, 118, 93, 0.1) 66% 67%, transparent 67%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(237, 246, 237, 0.92));
}

.focus-chart svg {
  width: 100%;
  height: 100%;
}

.focus-band {
  fill: rgba(116, 197, 154, 0.16);
}

.focus-line {
  fill: none;
  stroke: #66bd98;
  stroke-linecap: round;
  stroke-width: 5;
}

.focus-point {
  stroke: rgba(255, 253, 247, 0.96);
  stroke-width: 5;
}

.focus-point.coral {
  fill: var(--coral);
}

.focus-point.amber {
  fill: var(--amber);
}

.focus-point.mint {
  fill: var(--mint);
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signal-row div {
  min-height: 62px;
  border: 1px solid rgba(200, 217, 204, 0.9);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.82);
  padding: 11px;
}

.signal-row span,
.signal-row small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.signal-row strong {
  display: block;
  margin: 5px 0 1px;
  color: var(--teal-strong);
  font-size: 1.28rem;
  line-height: 1;
}

.device-float {
  position: fixed;
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  bottom: 98px;
  z-index: 30;
  display: grid;
  justify-items: end;
  pointer-events: none;
}

.device-orb,
.device-panel,
.device-row-new,
.device-close {
  pointer-events: auto;
}

/* Hover 胶囊气泡提示 */
.device-tooltip {
  position: absolute;
  right: 74px;
  top: 13px;
  white-space: nowrap;
  background: var(--teal-strong);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(13, 108, 97, 0.16);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  z-index: 10;
  border: 1px solid rgba(116, 197, 154, 0.25);
  animation: tooltip-show-once 5s ease forwards;
}

.device-float:hover .device-tooltip {
  animation: none; /* 覆盖初次载入动画 */
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

@keyframes tooltip-show-once {
  0%, 15% { opacity: 0; transform: translateX(10px) scale(0.95); }
  20%, 80% { opacity: 1; transform: translateX(0) scale(1); }
  85%, 100% { opacity: 0; transform: translateX(10px) scale(0.95); }
}

.device-tooltip-icon {
  font-size: 0.85rem;
}

/* 悬浮圆形按钮 (Watch Orb) */
.device-orb {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(13, 108, 97, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(13, 108, 97, 0.15), 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  padding: 0;
}

.device-orb:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 28px rgba(13, 108, 97, 0.22);
}

.device-orb:active {
  transform: scale(0.96);
}

/* 雷达呼吸外圈 */
.device-orb-pulse-ring,
.device-orb-pulse-ring2 {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  pointer-events: none;
  border: 1px solid rgba(116, 197, 154, 0.45);
}

.device-orb-pulse-ring {
  animation: pulse-radar 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.device-orb-pulse-ring2 {
  animation: pulse-radar 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  animation-delay: 1.5s;
}

@keyframes pulse-radar {
  0% { transform: scale(1); opacity: 0.8; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}

/* 表盘内圈进度与手表 */
.device-orb-watch {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.device-orb-svg {
  position: absolute;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.orb-track {
  fill: none;
  stroke: rgba(13, 108, 97, 0.06);
  stroke-width: 2.5;
}

.orb-progress {
  fill: none;
  stroke: var(--mint);
  stroke-width: 2.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-orb-icon-inner {
  color: var(--teal);
  display: grid;
  place-items: center;
  transition: transform 0.3s ease;
}

.device-orb:hover .device-orb-icon-inner {
  transform: rotate(10deg);
}

.watch-icon-svg {
  width: 22px;
  height: 22px;
  opacity: 0.95;
  display: block;
}

/* 指示灯/连接数角标 */
.device-orb-badge {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 1.5px solid #fff;
  transition: all 0.3s ease;
}

.device-orb-badge.has-connected {
  background: var(--mint);
  color: #fff;
  box-shadow: 0 0 8px rgba(116, 197, 154, 0.8);
}

/* 展开的设备面板 */
.device-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(374px, calc(100vw - 28px));
  max-height: calc(100vh - 178px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(116, 197, 154, 0.38);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(8, 48, 43, 0.98) 0%, rgba(13, 89, 79, 0.97) 70%, rgba(27, 75, 67, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  box-shadow: 0 26px 70px rgba(7, 54, 48, 0.4);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  visibility: hidden;
  transform-origin: right bottom;
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms ease;
  z-index: 100;
}

.device-float.open .device-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.device-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
}

.device-panel-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 12px;
  align-items: start;
  z-index: 1;
}

.device-panel .eyebrow {
  color: #9ce3b7;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.device-panel h2 {
  margin: 4px 0 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 600;
}

.device-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

@media (hover: hover) {
  .device-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }
}

.device-close:active {
  transform: scale(0.9);
}

/* 同步数据拟真动画区 */
.device-sync-stage {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(60px, 1fr) 78px;
  gap: 8px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(5, 40, 36, 0.35);
  z-index: 1;
}

/* Apple Watch 卡片 */
.watch-face-card {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), inset 0 2px 6px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.watch-face-card.active {
  border-color: rgba(116, 197, 154, 0.55);
  box-shadow: 0 8px 20px rgba(116, 197, 154, 0.15), 0 0 12px rgba(116, 197, 154, 0.25);
}

.watch-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.watch-screen-status {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 6px 0;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: monospace;
}

.watch-screen-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background-color 0.3s;
}

.watch-screen-dot.online {
  background: var(--mint);
  animation: dot-blink 1.5s infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.watch-screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6px 4px;
}

.pulse-wave-svg {
  width: 100%;
  height: 14px;
  color: rgba(255, 255, 255, 0.15);
  transition: color 0.4s ease;
}

.watch-face-card.active .pulse-wave-svg {
  color: var(--mint);
}

.watch-face-card.active .pulse-wave-svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: pulse-draw 2s linear infinite;
}

@keyframes pulse-draw {
  to { stroke-dashoffset: 0; }
}

.watch-screen-data {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 2px;
  color: #fff;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.watch-face-card.active .watch-screen-data {
  opacity: 1;
}

.watch-screen-data strong {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.watch-screen-data small {
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 2px;
  font-weight: 800;
}

/* 粒子同步能量光束 */
.sync-beam-new {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.beam-glow {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(116, 197, 154, 0.15), transparent);
  transition: background 0.4s;
}

.sync-beam-new.active .beam-glow {
  background: linear-gradient(90deg, transparent, rgba(116, 197, 154, 0.4), transparent);
}

.sync-beam-new .particles {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  z-index: 1;
}

.sync-beam-new .particles i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.sync-beam-new.active .particles i {
  background: rgba(116, 197, 154, 0.7);
  box-shadow: 0 0 6px rgba(116, 197, 154, 0.6);
}

.sync-beam-new.syncing .particles i {
  animation: sync-wave-pulse 1s infinite alternate;
}

.sync-beam-new.syncing .particles i:nth-child(1) { animation-delay: 0s; }
.sync-beam-new.syncing .particles i:nth-child(2) { animation-delay: 0.2s; }
.sync-beam-new.syncing .particles i:nth-child(3) { animation-delay: 0.4s; }

@keyframes sync-wave-pulse {
  0% { transform: scale(1); background: rgba(255, 255, 255, 0.12); }
  100% { transform: scale(1.6); background: var(--mint); box-shadow: 0 0 8px var(--mint); }
}

/* 血糖估计评估节点 */
.glucose-node-new {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s;
}

.glucose-node-new strong {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.4s;
}

.glucose-node-new span {
  font-size: 0.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
  transition: color 0.4s;
}

.glucose-node-new.active {
  background: #fffdf7;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.glucose-node-new.active strong {
  color: var(--teal-strong);
}

.glucose-node-new.active span {
  color: var(--sage-deep);
}

/* 设备选项列表 */
.device-list {
  display: grid;
  gap: 10px;
  z-index: 1;
}

.device-row-new {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  text-align: left;
  transition: background 220ms, border-color 220ms, transform 220ms;
}

@media (hover: hover) {
  .device-row-new:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
  }
}

.device-row-new:active:not(:disabled) {
  transform: scale(0.97);
}

.device-row-new:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.device-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 12px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.row-icon-svg {
  width: 18px;
  height: 18px;
}

.device-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.device-row-info strong {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.device-row-info small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 800;
}

.device-row-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.device-row-status em {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
}

/* 状态修饰类 */
.device-row-new.connected {
  border-color: rgba(116, 197, 154, 0.35);
  background: rgba(116, 197, 154, 0.08);
}

.device-row-new.connected .device-icon-wrapper {
  background: var(--mint);
  color: #084f49;
  box-shadow: 0 0 8px rgba(116, 197, 154, 0.3);
}

.device-row-new.connected .device-row-status em {
  background: rgba(116, 197, 154, 0.15);
  border-color: rgba(116, 197, 154, 0.3);
  color: #9ce3b7;
}

.device-row-new.syncing .device-row-status em {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
}

/* loading spinner */
.device-spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin-loading 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin-loading {
  to { transform: rotate(360deg); }
}

.device-note {
  position: relative;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.65rem;
  line-height: 1.45;
  z-index: 1;
}

.hero-top,
.row,
.panel-header,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-row > div {
  min-width: 0;
}

.panel-header {
  margin-bottom: 12px;
}

.status-pill,
.tag,
.risk-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 800;
}

.status-pill {
  border: 1px solid rgba(212, 139, 42, 0.28);
  background: var(--amber-soft);
  color: #8b5a13;
}

.status-pill.completed {
  border-color: rgba(116, 197, 154, 0.34);
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.tag {
  border: 1px solid var(--line);
  background: rgba(238, 246, 237, 0.88);
  color: var(--sage-deep);
}

.risk-pill {
  border: 1px solid rgba(223, 122, 85, 0.22);
  background: var(--coral-soft);
  color: #a85438;
}

.muted,
.helper,
.small {
  color: var(--muted);
}

.muted {
  margin-bottom: 0;
  line-height: 1.58;
}

.helper,
.small {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric-card {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.9);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.58rem;
  line-height: 1;
}

.chart {
  position: relative;
  height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(to bottom, transparent 30%, rgba(69, 118, 93, 0.1) 30% 31%, transparent 31% 64%, rgba(69, 118, 93, 0.1) 64% 65%, transparent 65%),
    linear-gradient(180deg, #fffdf7, #edf6ed);
}

.chart::before {
  content: "mmol/L";
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--quiet);
  font-size: 0.72rem;
  font-weight: 800;
}

.chart-svg {
  position: absolute;
  inset: 18px 10px 8px;
  width: calc(100% - 20px);
  height: calc(100% - 26px);
}

.chart-band {
  fill: rgba(116, 197, 154, 0.13);
}

.chart-polyline {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.chart-point {
  stroke: white;
  stroke-width: 4;
}

.chart-point.coral {
  fill: var(--coral);
}

.chart-point.amber {
  fill: var(--amber);
}

.chart-point.mint {
  fill: var(--mint);
}

.warning-list,
.recent-list,
.content-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.warning-list li,
.recent-list li,
.content-list li {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.88);
  padding: 12px;
  line-height: 1.45;
}

.recent-list li {
  display: grid;
  gap: 8px;
}

.warning-list li {
  border-left: 4px solid var(--amber);
  background: linear-gradient(90deg, rgba(255, 240, 212, 0.72), rgba(255, 253, 247, 0.94));
}

.warning-list li strong,
.warning-list li span,
.warning-list li em {
  display: block;
}

.warning-list li span,
.warning-list li em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.warning-list li em {
  color: var(--teal);
  font-weight: 800;
}

.recent-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--quiet);
  font-size: 0.74rem;
  font-weight: 800;
}

.recent-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scan-card {
  position: relative;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, white, rgba(238, 246, 237, 0.78));
  color: var(--ink);
  padding: 12px 9px;
  text-align: left;
  box-shadow: 0 8px 18px rgba(74, 101, 85, 0.08);
}

.scan-card::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(69, 118, 93, 0.3);
  border-radius: 8px 8px 8px 2px;
  transform: rotate(-12deg);
}

.scan-card strong,
.scan-card span {
  display: block;
}

.scan-card strong {
  font-size: 0.98rem;
}

.scan-card span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.choice-grid,
.tool-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.choice-button,
.tab-button,
.ghost-button,
.secondary-button,
.primary-button,
.retry-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(74, 101, 85, 0.07);
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-button:active,
.tab-button:active,
.ghost-button:active,
.secondary-button:active,
.primary-button:active,
.retry-button:active {
  transform: scale(0.97);
}

.choice-button,
.tab-button {
  color: var(--muted);
}

.choice-button.active,
.tab-button.active {
  border-color: rgba(69, 118, 93, 0.42);
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.primary-button {
  width: 100%;
  border-color: var(--sage-deep);
  background: linear-gradient(180deg, #6fa77e, var(--sage-deep));
  color: white;
}

.secondary-button {
  width: 100%;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--teal);
}

.analysis-card {
  padding: 14px;
}

.report-analysis {
  gap: 13px;
}

.report-analysis .panel-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: start;
}

.report-analysis .panel-header h3 {
  min-width: 0;
  line-height: 1.35;
}

.report-analysis .risk-pill {
  min-height: 26px;
  white-space: normal;
}

.report-action-preview {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(82, 147, 116, 0.36);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(231, 245, 234, 0.92), rgba(255, 253, 247, 0.98) 58%, rgba(220, 234, 243, 0.52)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.report-action-preview::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 4px;
  width: 82px;
  height: 96px;
  opacity: 0.1;
  background:
    linear-gradient(88deg, transparent 48%, var(--sage-deep) 48% 51%, transparent 51%),
    linear-gradient(132deg, transparent 0 44%, var(--sage) 44% 50%, transparent 50%);
  pointer-events: none;
  transform: rotate(8deg);
}

.report-action-preview > * {
  position: relative;
  z-index: 1;
}

.report-action-preview h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.report-action-preview .source-note {
  margin: 2px 0;
  border-left-color: var(--teal);
  background: rgba(255, 253, 247, 0.5);
}

.report-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-action-buttons .primary-button:only-child {
  grid-column: 1 / -1;
}

.meal-analysis {
  gap: 14px;
}

.meal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(200, 217, 204, 0.95);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(238, 246, 237, 0.86)),
    var(--surface);
  padding: 14px;
}

.meal-hero.warn {
  border-color: rgba(212, 139, 42, 0.42);
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.98), rgba(255, 253, 247, 0.92));
}

.meal-hero.danger {
  border-color: rgba(223, 122, 85, 0.46);
  background: linear-gradient(135deg, rgba(255, 240, 233, 0.98), rgba(255, 253, 247, 0.92));
}

.meal-hero h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
}

.meal-risk-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(212, 139, 42, 0.38);
  border-radius: 999px;
  background: var(--amber-soft);
  color: #8b4f08;
  padding: 0 10px;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 800;
}

.meal-hero.good .meal-risk-pill {
  border-color: rgba(116, 197, 154, 0.4);
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.meal-hero.danger .meal-risk-pill {
  border-color: rgba(223, 122, 85, 0.38);
  background: var(--coral-soft);
  color: #a1371b;
}

.meal-summary {
  margin: 0;
  border-left: 4px solid var(--sage);
  border-radius: 0 16px 16px 0;
  background: rgba(231, 245, 234, 0.68);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.58;
}

.label-analysis {
  gap: 14px;
}

.label-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(212, 139, 42, 0.44);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 235, 0.98), rgba(255, 253, 247, 0.94));
  padding: 14px;
}

.label-hero.green {
  border-color: rgba(116, 197, 154, 0.42);
  background: linear-gradient(135deg, rgba(231, 245, 234, 0.98), rgba(255, 253, 247, 0.94));
}

.label-hero.red {
  border-color: rgba(223, 122, 85, 0.46);
  background: linear-gradient(135deg, rgba(255, 240, 233, 0.98), rgba(255, 253, 247, 0.94));
}

.label-hero h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.28;
}

.label-advice-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(200, 217, 204, 0.92);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--teal-strong);
  padding: 0 10px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
}

.label-summary {
  margin: 0;
  border-left: 4px solid var(--amber);
  border-radius: 0 16px 16px 0;
  background: rgba(255, 240, 212, 0.58);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.58;
}

.traffic-light {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.traffic-step {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.88);
  color: var(--muted);
  text-align: center;
  opacity: 0.72;
}

.traffic-step i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--line-strong);
}

.traffic-step strong {
  font-size: 0.76rem;
  line-height: 1.25;
}

.traffic-step.green i {
  background: var(--mint);
}

.traffic-step.yellow i {
  background: var(--amber);
}

.traffic-step.red i {
  background: var(--coral);
}

.traffic-step.active {
  border-color: currentColor;
  box-shadow: 0 10px 24px rgba(74, 101, 85, 0.12);
  opacity: 1;
}

.traffic-step.green.active {
  color: var(--teal-strong);
  background: var(--mint-soft);
}

.traffic-step.yellow.active {
  color: #8b4f08;
  background: var(--amber-soft);
}

.traffic-step.red.active {
  color: #a1371b;
  background: var(--coral-soft);
}

.label-section {
  display: grid;
  gap: 9px;
}

.label-section h4 {
  margin: 0;
  color: var(--teal-strong);
  font-size: 0.98rem;
}

.label-reason-grid {
  display: grid;
  gap: 8px;
}

.label-reason-grid div,
.label-alternative-list div {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.92);
  padding: 11px 12px;
}

.label-reason-grid .warn {
  border-left-color: var(--amber);
}

.label-reason-grid .good {
  border-left-color: var(--mint);
}

.label-reason-grid span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--teal-strong);
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.label-reason-grid p,
.label-alternative-list p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.48;
}

.label-alternative-list {
  display: grid;
  gap: 8px;
}

.label-alternative-list div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border-left-color: var(--mint);
}

.label-alternative-list span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
  font-size: 0.74rem;
  font-weight: 900;
}

.label-alternative-list p {
  margin: 0;
}

.label-mark,
.report-mark {
  border-radius: 7px;
  padding: 0 3px;
  background: rgba(255, 240, 212, 0.9);
  color: #8b4f08;
  font-weight: 900;
}

.label-mark.danger,
.report-mark.danger {
  background: rgba(255, 240, 233, 0.95);
  color: #b42318;
}

.label-mark.good,
.report-mark.good {
  background: rgba(231, 245, 234, 0.92);
  color: var(--teal-strong);
}

.meal-section {
  display: grid;
  gap: 9px;
}

.meal-section h4 {
  margin: 0;
  color: var(--teal-strong);
  font-size: 0.98rem;
}

.meal-plate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.meal-plate-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.92);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(74, 101, 85, 0.08);
}

.meal-plate-card span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.meal-plate-card.staple span {
  background: var(--amber-soft);
  color: #8b4f08;
}

.meal-plate-card.cooking span {
  background: var(--coral-soft);
  color: #a1371b;
}

.meal-plate-card strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.42;
}

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

.meal-action-list div {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.92);
  padding: 11px 12px;
}

.meal-action-list p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
}

.meal-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 8px 18px rgba(74, 101, 85, 0.06);
}

.meal-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
}

.meal-insight-table {
  min-width: 360px;
}

.meal-table th,
.meal-table td {
  border-bottom: 1px solid rgba(223, 233, 223, 0.9);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.meal-table th {
  background: rgba(231, 245, 234, 0.82);
  color: var(--teal-strong);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.meal-table tr:last-child td {
  border-bottom: 0;
}

.meal-table tr.danger td {
  background: rgba(255, 240, 233, 0.42);
}

.meal-table strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.meal-status-pill,
.meal-metric {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(116, 197, 154, 0.38);
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.meal-status-pill.warn,
.meal-metric.warn {
  border-color: rgba(212, 139, 42, 0.38);
  background: var(--amber-soft);
  color: #8b4f08;
}

.meal-status-pill.danger,
.meal-metric.danger {
  border-color: rgba(223, 122, 85, 0.38);
  background: var(--coral-soft);
  color: #a1371b;
}

.meal-action-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-left-color: var(--sage);
}

.meal-action-list span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #6fa77e, var(--sage-deep));
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.meal-action-list p {
  margin: 2px 0 0;
}

.meal-mark {
  border-radius: 7px;
  padding: 0 3px;
  background: transparent;
  color: inherit;
  font-weight: 900;
}

.meal-mark.danger {
  background: rgba(255, 240, 233, 0.95);
  color: #b42318;
}

.meal-mark.warn {
  background: rgba(255, 240, 212, 0.9);
  color: #8b4f08;
}

.meal-mark.good {
  background: rgba(231, 245, 234, 0.92);
  color: var(--teal-strong);
}

.meal-source {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.label-analysis {
  gap: 14px;
}

.label-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(231, 245, 234, 0.86), rgba(255, 253, 247, 0.96));
  padding: 16px;
}

.label-hero h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.25;
}

.label-hero span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
}

.label-hero > strong,
.label-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.label-hero.good > strong,
.label-status.good {
  border: 1px solid rgba(116, 197, 154, 0.42);
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.label-hero.warn > strong,
.label-status.watch {
  border: 1px solid rgba(212, 139, 42, 0.38);
  background: var(--amber-soft);
  color: #8b4f08;
}

.label-hero.danger > strong,
.label-status.bad {
  border: 1px solid rgba(223, 122, 85, 0.42);
  background: var(--coral-soft);
  color: #a1371b;
}

.label-summary {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.55;
}

.label-section {
  display: grid;
  gap: 9px;
}

.label-section h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.label-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.94);
}

.label-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.45;
}

.label-table th,
.label-table td {
  border-bottom: 1px solid rgba(223, 233, 223, 0.9);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.label-table th {
  background: rgba(231, 245, 234, 0.82);
  color: var(--teal-strong);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.label-table tr:last-child td {
  border-bottom: 0;
}

.label-table strong,
.label-table small {
  display: block;
}

.label-table small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.label-detail-grid,
.label-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.label-mini-panel,
.label-signal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.92);
  padding: 12px;
}

.label-mini-panel > span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.label-mini-panel ol,
.label-signal ul {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
}

.label-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.label-nutrition-grid div {
  border-radius: 12px;
  background: rgba(231, 245, 234, 0.72);
  padding: 8px;
}

.label-nutrition-grid strong,
.label-nutrition-grid small {
  display: block;
}

.label-nutrition-grid strong {
  color: var(--teal-strong);
  font-size: 0.92rem;
}

.label-nutrition-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.label-signal.good {
  border-left: 5px solid var(--mint);
}

.label-signal.warn {
  border-left: 5px solid var(--amber);
}

.label-signal.danger {
  border-left: 5px solid #c2410c;
  background: linear-gradient(90deg, rgba(255, 240, 233, 0.72), rgba(255, 253, 247, 0.94));
}

.label-signal.neutral {
  border-left: 5px solid var(--sage);
}

.label-signal li.danger,
.report-advice-list li.danger {
  border-color: rgba(223, 122, 85, 0.42);
  background: linear-gradient(90deg, rgba(255, 240, 233, 0.72), rgba(255, 253, 247, 0.94));
}

.label-signal li.good,
.report-advice-list li.good {
  border-color: rgba(116, 197, 154, 0.42);
  background: rgba(231, 245, 234, 0.68);
}

.report-section {
  display: grid;
  gap: 9px;
}

.report-section h4 {
  margin: 0;
  color: var(--teal-strong);
  font-size: 0.98rem;
}

.compact-list {
  gap: 7px;
  margin-top: 0;
}

.compact-list li {
  padding: 10px 11px;
}

.report-finding-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-finding-list li {
  position: relative;
  border: 1px solid rgba(200, 217, 204, 0.88);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.86);
  color: var(--ink);
  padding: 10px 12px 10px 30px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
}

.report-finding-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1.05em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(116, 197, 154, 0.16);
}

.report-finding-list li.danger {
  border-color: rgba(223, 122, 85, 0.42);
  background: linear-gradient(90deg, rgba(255, 240, 233, 0.72), rgba(255, 253, 247, 0.94));
}

.report-finding-list li.danger::before {
  background: #c2410c;
  box-shadow: 0 0 0 4px rgba(223, 122, 85, 0.18);
}

.report-finding-list li.good {
  border-color: rgba(116, 197, 154, 0.42);
  background: rgba(231, 245, 234, 0.68);
}

.report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.9);
}

.report-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.42;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid rgba(223, 233, 223, 0.9);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.report-table th {
  background: rgba(231, 245, 234, 0.78);
  color: var(--teal-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.report-table tr:last-child td {
  border-bottom: 0;
}

.report-table strong,
.report-table small {
  display: block;
}

.report-table strong {
  color: var(--teal-strong);
  font-size: 0.84rem;
}

.report-table small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.curve-table {
  min-width: 420px;
}

.table-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(116, 197, 154, 0.36);
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
  padding: 0 8px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
}

.table-pill.danger {
  border-color: rgba(223, 122, 85, 0.42);
  background: var(--coral-soft);
  color: #a1371b;
}

.table-pill.warn {
  border-color: rgba(212, 139, 42, 0.38);
  background: var(--amber-soft);
  color: #8b4f08;
}

.table-pill.good {
  border-color: rgba(116, 197, 154, 0.42);
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.report-derived-grid div.danger {
  border-color: rgba(223, 122, 85, 0.42);
  background: linear-gradient(180deg, rgba(255, 240, 233, 0.78), rgba(255, 253, 247, 0.94));
}

.report-derived-grid div {
  min-height: 98px;
}

.raw-fields {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.78);
  padding: 0 12px;
}

.raw-fields summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--teal-strong);
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  transition: transform 0.1s ease;
}

.raw-fields summary::-webkit-details-marker {
  display: none;
}

.raw-fields summary:active {
  transform: scale(0.98);
}

.raw-fields summary::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--teal-strong);
  border-bottom: 2px solid var(--teal-strong);
  transform: rotate(45deg); /* Downward arrow */
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 4px;
}

.raw-fields[open] summary::after {
  transform: rotate(-135deg); /* Upward arrow */
}

.raw-fields .field-table {
  padding-bottom: 12px;
}

.stream-card {
  border: 1px solid rgba(69, 118, 93, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(238, 246, 243, 0.95), rgba(255, 253, 247, 0.94)),
    var(--surface);
  padding: 13px 14px;
  box-shadow: 0 10px 24px rgba(74, 101, 85, 0.08);
}

.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.stream-header i {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--sage-deep));
  animation: stream-pulse 1.1s ease-in-out infinite;
}

.typewriter-text {
  min-height: 56px;
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.65;
  white-space: pre-wrap;
}

.typewriter-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--sage-deep);
  vertical-align: -0.15em;
  animation: caret-blink 760ms steps(2, start) infinite;
}

.tool-hero {
  background:
    linear-gradient(135deg, rgba(238, 246, 243, 0.96), rgba(255, 253, 247, 0.92)),
    var(--surface);
}

.scanner-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.9);
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.scanner-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  overflow: hidden;
  border: 1px dashed rgba(69, 118, 93, 0.46);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(69, 118, 93, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(69, 118, 93, 0.08) 1px, transparent 1px),
    #fbfaf3;
  background-size: 28px 28px;
  padding: 18px;
  text-align: center;
}

.scanner-frame.has-preview {
  display: block;
  min-height: 220px;
  padding: 0;
  background: #f7f4ec;
}

.scanner-frame::before,
.scanner-frame::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: var(--sage-deep);
  border-style: solid;
  z-index: 3;
}

.scanner-frame::before {
  left: 14px;
  top: 14px;
  border-width: 2px 0 0 2px;
}

.scanner-frame::after {
  right: 14px;
  bottom: 14px;
  border-width: 0 2px 2px 0;
}

.scanner-line {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mint), transparent);
  z-index: 2;
}

.scanner-preview {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(238, 246, 237, 0.82));
}

.scanner-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 10px 12px;
  border: 1px solid rgba(255, 253, 247, 0.72);
  border-radius: 13px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 8px 20px rgba(20, 50, 38, 0.12);
  text-align: left;
  backdrop-filter: blur(14px);
}

.scanner-frame strong {
  max-width: 260px;
  color: var(--teal-strong);
  font-size: 1.08rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.scanner-caption strong {
  max-width: none;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-frame span {
  max-width: 260px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.scanner-caption span {
  max-width: none;
  margin-top: 5px;
  font-size: 0.76rem;
}

.tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.file-input {
  display: none;
}

.analysis-card h3,
.article-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.field-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field-table div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.action-card {
  padding: 14px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.action-section {
  display: grid;
  gap: 10px;
}

.section-heading.compact {
  padding-top: 4px;
}

.section-heading.compact h2 {
  font-size: 1rem;
}

@media (hover: hover) {
  .action-card:hover {
    transform: translateY(-1px);
  }
}

.action-card:active {
  transform: translateY(1px);
}

.action-card.primary-action {
  border-color: rgba(82, 147, 116, 0.42);
  background:
    linear-gradient(135deg, rgba(231, 245, 234, 0.9), rgba(255, 253, 247, 0.96) 62%, rgba(220, 234, 243, 0.56)),
    var(--surface);
}

.action-card.primary-action h3 {
  margin: 8px 0 6px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.35;
}

.action-card.done {
  border-color: rgba(116, 197, 154, 0.48);
  background: linear-gradient(90deg, rgba(231, 245, 234, 0.86), rgba(255, 253, 247, 0.94));
}

.action-card.confirmed {
  border-color: rgba(212, 139, 42, 0.42);
  background: linear-gradient(90deg, rgba(255, 240, 212, 0.76), rgba(255, 253, 247, 0.94));
}

.source-note {
  display: grid;
  gap: 4px;
  margin: 10px 0 8px;
  border-left: 3px solid var(--sage);
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.source-note strong {
  color: var(--teal-strong);
  font-size: 0.78rem;
}

.action-steps {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.action-steps p {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  border: 1px solid rgba(223, 233, 223, 0.88);
  border-radius: 13px;
  background: rgba(255, 253, 247, 0.78);
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.action-steps strong {
  color: var(--teal-strong);
  font-size: 0.74rem;
  font-weight: 900;
}

.action-steps .guard {
  border-color: rgba(223, 122, 85, 0.32);
  background: rgba(255, 240, 233, 0.58);
}

.action-steps .guard strong {
  color: #a1371b;
}

.checkbox {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
}

.checkbox.done {
  border-color: var(--mint);
  background: var(--mint);
}

.checkbox.done::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  width: 7px;
  height: 13px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.call-card {
  min-height: 390px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(238, 246, 243, 0.9), rgba(255, 253, 247, 0.94)),
    var(--surface);
}

.crisis-card {
  display: grid;
  gap: 10px;
  border-color: rgba(223, 122, 85, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 240, 233, 0.72), rgba(255, 253, 247, 0.96) 62%, rgba(231, 245, 234, 0.42)),
    var(--surface);
}

.support-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.avatar {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.82), transparent 34%),
    linear-gradient(135deg, var(--blue), var(--sage-deep));
  box-shadow: 0 16px 42px rgba(69, 118, 93, 0.22);
}

.wave {
  width: 168px;
  height: 48px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 8%, var(--mint) 8% 13%, transparent 13% 23%, var(--teal) 23% 28%, transparent 28% 42%, var(--coral) 42% 47%, transparent 47% 63%, var(--amber) 63% 68%, transparent 68%),
    var(--blue-soft);
  opacity: 0.76;
}

.article-card {
  padding: 14px;
  background: linear-gradient(180deg, white, rgba(238, 246, 243, 0.62));
}

.content-section {
  display: grid;
  gap: 10px;
}

.section-heading {
  display: grid;
  gap: 4px;
  padding: 0 2px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  gap: 12px;
}

.guide-card {
  background: linear-gradient(135deg, rgba(231, 245, 234, 0.72), rgba(255, 253, 247, 0.96));
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--quiet);
  font-size: 0.76rem;
  font-weight: 800;
}

.article-subtitle {
  margin: -2px 0 10px;
  color: var(--quiet);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  border: 1px solid rgba(69, 118, 93, 0.18);
  border-radius: 999px;
  background: rgba(231, 245, 234, 0.88);
  color: var(--teal);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.source-line {
  margin: 12px 0 0;
  color: var(--quiet);
  font-size: 0.76rem;
  line-height: 1.4;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 6px;
  border: 0;
  background: transparent;
  color: var(--teal-strong);
  padding: 0 8px;
  margin-left: -8px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.1s ease;
}

.text-link:active {
  opacity: 0.65;
}

.secondary-link {
  color: var(--quiet);
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(231, 245, 234, 0.78), rgba(255, 253, 247, 0.96));
}

.detail-card h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.back-button {
  justify-self: start;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--teal-strong);
  padding: 0 16px;
  font-weight: 800;
  transition: transform 0.1s ease;
}

.back-button:active {
  transform: scale(0.96);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(122, 167, 131, 0.3);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 253, 247, 0.98), rgba(238, 246, 243, 0.92) 58%, rgba(255, 240, 212, 0.55)),
    var(--surface);
  padding: 17px;
  box-shadow: var(--shadow-soft);
}

.profile-hero::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(69, 118, 93, 0.16);
  border-radius: 999px;
  background: rgba(231, 245, 234, 0.44);
  pointer-events: none;
}

.profile-lead {
  margin: 12px 0 6px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.5;
}

.profile-metric-grid,
.mini-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-metric-card,
.mini-metric-grid div {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.92);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(74, 101, 85, 0.08);
}

.profile-metric-card span,
.mini-metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-metric-card strong,
.mini-metric-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-strong);
  font-size: 1.45rem;
  line-height: 1;
}

.mini-metric-grid strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.profile-metric-card small,
.mini-metric-grid small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-metric-card strong small {
  margin-left: 3px;
}

.profile-metric-card p,
.profile-metric-card em {
  display: block;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

.profile-metric-card em {
  color: var(--quiet);
}

.profile-chart {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(to bottom, transparent 33%, rgba(69, 118, 93, 0.1) 33% 34%, transparent 34% 66%, rgba(69, 118, 93, 0.1) 66% 67%, transparent 67%),
    linear-gradient(180deg, #fffdf7, #edf6ed);
}

.profile-chart svg {
  display: block;
  width: 100%;
  height: 132px;
}

.profile-chart-band {
  fill: rgba(116, 197, 154, 0.14);
}

.profile-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.profile-chart-line.baseline {
  stroke: rgba(212, 139, 42, 0.72);
  stroke-dasharray: 7 7;
}

.profile-chart-line.latest {
  stroke: var(--teal);
}

.profile-chart-legend,
.profile-time-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.profile-time-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  text-align: center;
  font-size: 0.68rem;
}

.profile-chart-legend i {
  display: inline-block;
  width: 18px;
  height: 4px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: 0.12em;
}

.profile-chart-legend i.latest {
  background: var(--teal);
}

.profile-chart-legend i.baseline {
  background: var(--amber);
}

.profile-chart-copy {
  margin: 0;
  border-left: 4px solid var(--teal);
  border-radius: 0 16px 16px 0;
  background: rgba(231, 245, 234, 0.68);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.48;
}

.profile-details {
  position: relative;
  border: 1px solid rgba(200, 217, 204, 0.86);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow-soft);
  padding: 0;
}

.profile-details summary {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.profile-details summary::-webkit-details-marker {
  display: none;
}

.profile-details summary strong,
.profile-detail-section h2 {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
}

.profile-details summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.profile-details summary em {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
  padding: 0 10px;
  white-space: nowrap;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
}

.profile-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.profile-details[open] summary em {
  background: var(--surface);
  font-size: 0;
}

.profile-details[open] summary em::after {
  content: "收起";
  font-size: 0.74rem;
}

.profile-details-body {
  padding: 14px;
}

.profile-detail-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.7);
  padding: 12px;
}

.profile-lab-group {
  display: grid;
  gap: 8px;
}

.profile-lab-group h3 {
  margin: 2px 0 0;
  color: var(--teal-strong);
  font-size: 0.96rem;
}

.profile-lab-list,
.priority-list,
.timeline-list {
  display: grid;
  gap: 8px;
}

.profile-lab-list div,
.priority-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.84);
  padding: 11px;
}

.profile-lab-list div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 4px 8px;
}

.profile-lab-list strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.profile-lab-list span {
  color: var(--teal-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-lab-list small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.priority-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}

.priority-item > strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--teal-strong);
}

.priority-item span,
.timeline-item strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.priority-item p,
.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid rgba(200, 217, 204, 0.82);
  border-radius: 22px;
  background: rgba(255, 253, 247, 0.92);
  padding: 8px;
  box-shadow: 0 16px 42px rgba(63, 87, 74, 0.16);
  backdrop-filter: blur(16px);
  z-index: 3;
}

.nav-button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 0.1s ease;
}

.nav-button:active {
  transform: scale(0.96);
}

.nav-button.active {
  background: linear-gradient(180deg, #5e9a75, var(--teal-strong));
  color: white;
  box-shadow: 0 8px 18px rgba(8, 79, 73, 0.22);
}

.register-dialog {
  width: min(100% - 28px, 390px);
  border: 0;
  border-radius: 22px;
  padding: 0;
  background: transparent;
}

.register-dialog::backdrop {
  background: rgba(49, 82, 70, 0.34);
  backdrop-filter: blur(8px);
}

.register-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.register-card h2 {
  margin: 0;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 12px;
  background: #fffdf7;
  color: var(--ink);
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #a85438;
  font-size: 0.86rem;
}

.medical-boundary {
  border-left: 4px solid var(--sage);
  padding: 10px 12px;
  border-radius: 0 16px 16px 0;
  background: rgba(231, 245, 234, 0.72);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (prefers-reduced-motion: no-preference) {
  .focus-card,
  .card,
  .article-card,
  .action-card,
  .scanner-panel {
    animation: card-rise 420ms ease both;
  }

  .scanner-line {
    animation: scan-breathe 2.4s ease-in-out infinite;
  }

  .device-orb-ring {
    animation: device-glow 2.8s ease-in-out infinite;
  }

  .device-orb-wave {
    animation: device-ping 2.4s ease-out infinite;
  }

  .sync-beam i {
    animation: beam-flow 1.35s ease-in-out infinite;
  }

  .sync-beam i:nth-child(2) {
    animation-delay: 140ms;
  }

  .sync-beam i:nth-child(3) {
    animation-delay: 280ms;
  }

  .watch-face span {
    animation: heart-arc 1.5s ease-in-out infinite;
  }
}

@media (max-width: 430px) {
  .report-table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .report-table,
  .report-table thead,
  .report-table tbody,
  .report-table tr,
  .report-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .report-table thead {
    display: none;
  }

  .report-table tr {
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 247, 0.9);
    overflow: hidden;
  }

  .report-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid rgba(223, 233, 223, 0.8);
    padding: 9px 10px;
  }

  .report-table td:last-child {
    border-bottom: 0;
  }

  .report-table td::before {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .report-table:not(.curve-table) td:nth-child(1)::before {
    content: "指标";
  }

  .report-table:not(.curve-table) td:nth-child(2)::before {
    content: "本次";
  }

  .report-table:not(.curve-table) td:nth-child(3)::before {
    content: "标准";
  }

  .report-table:not(.curve-table) td:nth-child(4)::before {
    content: "判读";
  }

  .curve-table td:nth-child(1)::before {
    content: "时间";
  }

  .curve-table td:nth-child(2)::before {
    content: "血糖";
  }

  .curve-table td:nth-child(3)::before {
    content: "胰岛素";
  }

  .curve-table td:nth-child(4)::before {
    content: "C肽";
  }

  .label-hero,
  .label-detail-grid,
  .label-signal-grid {
    grid-template-columns: 1fr;
  }

  .label-hero {
    display: grid;
  }

  .label-table {
    min-width: 420px;
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-breathe {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(-16px);
  }
  50% {
    opacity: 0.9;
    transform: translateY(16px);
  }
}

@keyframes stream-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleX(0.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes device-glow {
  0%,
  100% {
    opacity: 0.62;
    box-shadow: inset 0 0 18px rgba(116, 197, 154, 0.28);
  }
  50% {
    opacity: 1;
    box-shadow: inset 0 0 28px rgba(156, 227, 183, 0.52), 0 0 20px rgba(116, 197, 154, 0.28);
  }
}

@keyframes device-ping {
  0% {
    opacity: 0.62;
    transform: scale(0.88);
  }
  100% {
    opacity: 0;
    transform: scale(1.3);
  }
}

@keyframes beam-flow {
  0%,
  100% {
    opacity: 0.34;
    transform: translateX(-8px) scaleX(0.72);
  }
  50% {
    opacity: 1;
    transform: translateX(8px) scaleX(1);
  }
}

@keyframes heart-arc {
  0%,
  100% {
    transform: scale(1);
  }
  46% {
    transform: scale(1.12);
  }
}

@media (max-width: 360px) {
  .screen {
    padding-inline: 12px;
  }

  .wellness-score {
    grid-template-columns: 1fr;
  }

  .score-ring {
    justify-self: start;
  }

  .signal-row,
  .scan-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) {
  body {
    padding: 28px 0;
  }

  .app-frame {
    min-height: min(900px, calc(100vh - 56px));
    border: 1px solid rgba(200, 217, 204, 0.72);
    border-radius: 24px;
  }

  .screen {
    height: calc(min(900px, 100vh - 56px) - 86px);
  }
}

/* AI 识别超时与重试 UI 优化 */
.error-tip-box {
  border-left: 4px solid var(--coral);
  padding: 10px 12px;
  border-radius: 0 16px 16px 0;
  background: var(--coral-soft);
  color: #a85438;
  font-size: 0.82rem;
  line-height: 1.45;
}

.error-tip-box p {
  margin: 0;
}

.retry-button {
  width: 100%;
  border-color: var(--coral);
  background: linear-gradient(180deg, #f78d68, var(--coral));
  color: white;
}

/* ==========================================
   V3 自然场景主题样式 (V3 Nature Scene Theme)
   ========================================== */

/* 全局头部样式升级 */
.app-header .eyebrow {
  color: #064935;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  margin: 0;
}

.app-header .logo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.app-header .logo-mark {
  width: 12px;
  height: 28px;
  border-radius: 999px 999px 999px 3px;
  background: linear-gradient(180deg, #8ed99a, #0f7a55 78%);
  box-shadow: 0 6px 14px rgba(29, 120, 77, 0.18);
}

.app-header .wordmark {
  color: #073a2f;
  font-family: "Noto Serif SC", serif;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  margin: 0;
}

.app-header .switch {
  min-width: 84px;
  min-height: 40px;
  border: 1px solid rgba(105, 153, 119, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 249, 0.88);
  color: #0d5a40;
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 10px 24px rgba(66, 92, 70, 0.08);
  cursor: pointer;
}

.app-header .switch svg {
  width: 14px;
  height: 14px;
}

/* 概览主卡片 */
.app-frame .focus-card {
  margin: 6px 0 12px !important;
  padding: 18px 20px 16px;
  border: 1px solid rgba(112, 153, 107, 0.22) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(145deg, rgba(255, 254, 244, 0.91), rgba(255, 250, 231, 0.78)),
    rgba(255, 253, 242, 0.86) !important;
  box-shadow: 0 16px 34px rgba(73, 87, 57, 0.12) !important;
  backdrop-filter: blur(4px);
}

.app-frame .focus-card::before {
  display: none !important; /* 隐藏原本的叶子遮罩 */
}

.app-frame .focus-card .hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.app-frame .focus-card h2 {
  color: #053d31;
  font-family: "Noto Serif SC", serif;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 12px 0 0;
  white-space: nowrap;
}

.app-frame .focus-card .hero-top .eyebrow {
  color: #174a37;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
}

.app-frame .focus-card .status-pill {
  min-height: 28px;
  border: 1px solid rgba(230, 128, 34, 0.22) !important;
  background: rgba(255, 243, 211, 0.82) !important;
  color: #df641e !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 12px;
}

/* 概览分数与圆环 */
.app-frame .wellness-score {
  grid-template-columns: 112px 1px minmax(0, 1fr) !important;
  gap: 16px !important;
  margin: 17px 0 14px !important;
  align-items: center !important;
}

.app-frame .score-ring {
  width: 112px !important;
  height: 112px !important;
  position: relative;
  background: conic-gradient(#42aa49 0 82%, #e4efe6 82% 100%) !important;
  box-shadow: 0 14px 24px rgba(38, 132, 73, 0.16) !important;
}

.app-frame .score-ring::after {
  content: "" !important;
  position: absolute !important;
  inset: 10px !important;
  border-radius: 50% !important;
  background: rgba(255, 254, 246, 0.94) !important;
  z-index: 0 !important;
}

.app-frame .score-ring strong {
  font-size: 42px !important;
  color: #073e31 !important;
  position: relative !important;
  z-index: 1 !important;
}

.app-frame .score-ring span {
  margin-top: 6px !important;
  font-size: 14px !important;
  color: #526b5c !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 竖直分割线 */
.app-frame .focus-card .divider {
  width: 1px;
  height: 70px;
  background: rgba(118, 132, 111, 0.24);
}

/* 圆环终点圆点指示器 */
.app-frame .score-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #2f9d53;
  border: 2px solid #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin-top: -6px;
  margin-left: -6px;
  transform: rotate(288deg) translateY(-51px);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.app-frame .focus-copy {
  margin-top: 12px !important;
  color: #1f2e2b !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
}

.app-frame .soft-checks {
  margin-top: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}

.app-frame .soft-checks span::before {
  display: none !important;
}

.app-frame .soft-checks span {
  color: #1f2e2a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding-left: 0 !important;
}

.app-frame .soft-checks div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-frame .soft-checks i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(226, 241, 213, 0.92);
  color: #2d7747;
}

.app-frame .soft-checks svg {
  width: 17px;
  height: 17px;
}

/* 血糖趋势图表卡片 */
.app-frame .chart-box {
  position: relative;
  overflow: hidden;
  height: 142px !important;
  border: 1px solid rgba(99, 116, 94, 0.22) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 250, 0.58) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38) !important;
  margin: 12px 0 12px;
}

.app-frame .chart-meta {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  color: #1d2a28;
  font-size: 12px;
  font-weight: 600;
}

.app-frame .axis-y,
.app-frame .axis-x {
  position: absolute;
  color: #2b3331;
  font-size: 11px;
}

#variant-three .axis-y {
  left: 8px !important;
  top: 40px !important;
  bottom: 30px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

#variant-three .axis-x {
  left: 35px !important;
  right: 15px !important;
  bottom: 13px !important;
  display: flex !important;
  justify-content: space-between !important;
}

.app-frame .chart-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 三格卡片 Grid */
.app-frame .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.app-frame .metric-card {
  height: 74px;
  padding: 11px 8px 10px;
  border: none !important;
  border-radius: 12px !important;
  background: #f2f8f4 !important;
  box-shadow: none !important;
  position: relative;
  overflow: hidden;
}

.app-frame .metric-card:nth-child(2) {
  background: #f4f4fa !important;
}

.app-frame .metric-card:nth-child(3) {
  background: #fdf8f0 !important;
}

.app-frame .metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  z-index: 0;
  pointer-events: none;
}

.app-frame .metric-card:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0,15 C30,5 70,25 100,10 L100,30 L0,30 Z' fill='rgba%2847, 157, 83, 0.12%29'/%3E%3C/svg%3E");
}

.app-frame .metric-card:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0,15 C30,25 70,5 100,15 L100,30 L0,30 Z' fill='rgba%2888, 101, 242, 0.08%29'/%3E%3C/svg%3E");
}

.app-frame .metric-card:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M0,10 C40,25 60,5 100,15 L100,30 L0,30 Z' fill='rgba%28244, 154, 23, 0.1%29'/%3E%3C/svg%3E");
}

.app-frame .metric-card span,
.app-frame .metric-card strong,
.app-frame .metric-card em {
  position: relative;
  z-index: 1;
}

.app-frame .metric-card span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  color: #526b5c;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.app-frame .metric-card strong {
  display: inline-block;
  margin-top: 4px;
  color: #073e31;
  font-size: 23px;
  font-weight: 800;
  vertical-align: baseline;
  line-height: 1;
}

.app-frame .metric-card em {
  display: block;
  margin-left: 0;
  margin-top: 2px;
  color: #768c80;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  vertical-align: baseline;
}

/* 今日提醒卡片优化 */
.app-frame .warning-list strong {
  font-size: 1.05rem !important;
  color: #064935 !important;
}

.app-frame .warning-list em {
  color: #2f9d53 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
}

.app-frame .panel-header .ghost-button {
  min-height: 32px;
  padding: 0 15px;
  border: 1px solid rgba(47, 157, 83, 0.25) !important;
  background: #ffffff !important;
  color: #2f9d53 !important;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: none;
}

/* 拍照分析等其它模块的卡片 */
.app-frame .card {
  border: 1px solid rgba(112, 153, 107, 0.18) !important;
  background: rgba(255, 255, 253, 0.82) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 28px rgba(73, 87, 57, 0.06) !important;
}

/* 底部导航栏与激活状态药丸效果 */
.app-frame .bottom-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(111, 135, 113, 0.14) !important;
  box-shadow: 0 -10px 30px rgba(41, 66, 53, 0.05) !important;
}

.app-frame .nav-button.active {
  background: #134d37 !important;
  color: white !important;
  box-shadow: 0 6px 14px rgba(19, 77, 55, 0.22) !important;
  border-radius: 14px !important;
}

/* 硬件接入悬浮按钮色彩调和 */
.app-frame .device-orb {
  border: 1px solid rgba(19, 77, 55, 0.15) !important;
  box-shadow: 0 8px 24px rgba(19, 77, 55, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

.app-frame .device-orb-pulse-ring,
.app-frame .device-orb-pulse-ring2 {
  border: 1px solid rgba(47, 157, 83, 0.45) !important;
}

/* 绿叶喷绘背景 */
.app-frame .leaf-spray {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
