/* V1健康页面独立设计系统：390px优先，桌面限制内容宽度；不改变旧管理/历史样式。 */
.health-app {
  --ink:#203d3b;
  --sub:#728380;
  --accent:#388f7e;
  --tone:#e66b65;
  min-height:100vh;
  background:#f5f8f6;
  color:var(--ink);
  font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;
  line-height:1.6
}
.health-app * {
  box-sizing:border-box
}
.health-app a {
  color:inherit;
  text-decoration:none
}
.health-app button,.health-app input {
  font:inherit
}
.health-header {
  background:#ffffffec;
  border-bottom:1px solid #e5ede8;
  position:sticky;
  top:0;
  z-index:15;
  backdrop-filter:blur(16px)
}
.health-header-inner {
  max-width:1032px;
  margin:auto;
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 32px;
  position:relative
}
.health-wordmark {
  font-size:24px;
  font-weight:750;
  letter-spacing:-1px
}
.health-wordmark span {
  margin-left:10px;
  font-size:12px;
  color:var(--sub);
  font-weight:400;
  letter-spacing:2px
}
.health-header-title {
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  font-size:14px;
  font-weight:600;
  color:#57746c
}
.health-avatar {
  height:38px;
  width:38px;
  border-radius:50%;
  background:#e9f1eb;
  display:grid;
  place-items:center;
  border:1px solid #d6e5db;
  overflow:hidden
}
.health-avatar img {
  width:100%;
  height:100%;
  object-fit:cover
}
.health-back {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:22px
}
.health-back span {
  font-size:13px
}
.health-content {
  max-width:1032px;
  margin:0 auto;
  padding:32px 32px 48px
}
.health-home-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:16px
}
.health-home-title h2 {
  margin:0;
  font-size:28px;
  letter-spacing:-1px
}
.health-home-title>span {
  font-size:12px;
  color:var(--sub)
}
.health-demo {
  border:1px solid #d9e8df;
  background:#eef5ef;
  border-radius:10px;
  padding:9px 12px;
  font-size:11px;
  color:#567863;
  display:flex;
  align-items:center;
  gap:8px
}
.demo-dot {
  width:6px;
  height:6px;
  flex-shrink:0;
  border-radius:50%;
  background:#6d9875
}
.health-welcome {
  padding:28px 0 24px
}
.health-eyebrow {
  font-size:10px!important;
  font-weight:650;
  letter-spacing:2px;
  color:var(--sub);
  margin:0 0 8px!important
}
.health-welcome h1 {
  font-size:38px;
  line-height:1.35;
  letter-spacing:-1.3px;
  font-weight:650;
  margin:12px 0 16px
}
.health-welcome h1 span {
  color:#6aab8f
}
.health-welcome>p:not(.health-eyebrow) {
  font-size:13px;
  color:#687e76;
  margin:0
}
.health-welcome>span {
  font-size:13px;
  color:#899790
}
.health-intro-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px
}
.health-score-card {
  display:grid;
  grid-template-columns:1fr auto;
  background:#fff;
  border:1px solid #e6ede8;
  padding:24px;
  border-radius:22px;
  box-shadow:0 8px 28px #294c3910;
  align-items:center
}
.health-score-card h2 {
  font-size:18px;
  margin:8px 0
}
.health-score-card>div>p {
  font-size:12px;
  color:var(--sub);
  margin:0
}
.health-score {
  width:142px;
  height:142px;
  position:relative
}
.health-score svg {
  width:100%;
  height:100%;
  transform:rotate(-90deg)
}
.health-score circle {
  fill:none;
  stroke-width:9
}
.score-track {
  stroke:#eaf2ec
}
.score-progress {
  stroke:#6aab8c;
  stroke-linecap:round
}
.health-score>div {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column
}
.health-score strong {
  font-size:40px;
  line-height:1.1;
  letter-spacing:-2px;
  font-weight:650
}
.health-score>div span {
  font-size:11px;
  color:var(--sub)
}
.health-score-caption {
  grid-column:1/-1;
  font-size:10px!important;
  color:#87968c;
  margin:16px 0 0!important;
  line-height:1.7
}
.health-advice {
  border-radius:22px;
  background:#e6eee4;
  padding:26px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid #dde7d8
}
.advice-heading {
  display:flex;
  align-items:center;
  gap:10px
}
.advice-heading>span {
  font-size:25px;
  color:#608665
}
.advice-heading h2 {
  font-size:17px;
  margin:0
}
.health-advice>p {
  font-size:14px;
  line-height:1.9;
  margin:12px 0 22px;
  color:#546c53
}
.advice-foot {
  font-size:10px;
  color:#82947b;
  letter-spacing:1px
}
.health-section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:28px 0 14px
}
.health-section-title h2 {
  font-size:18px;
  margin:0
}
.health-section-title span {
  font-size:11px;
  color:var(--sub)
}
.health-cards {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px
}
.health-metric {
  display:flex;
  align-items:center;
  padding:24px;
  border:1px solid #e4ebe6;
  border-radius:20px;
  min-height:158px;
  background:white;
  position:relative;
  overflow:hidden;
  transition:transform .2s,border-color .2s,box-shadow .2s
}
.health-metric:hover {
  transform:translateY(-3px);
  box-shadow:0 8px 30px #355b3710;
  border-color:#9cb9aa
}
.health-metric-icon {
  width:46px;
  height:46px;
  border-radius:15px;
  background:#fff0ee;
  color:#df6f65;
  display:grid;
  place-items:center;
  flex-shrink:0;
  margin-right:18px
}
.health-metric-icon svg {
  width:24px;
  height:24px
}
.sleep .health-metric-icon {
  background:#f0edfa;
  color:#9c85c8
}
.oxygen .health-metric-icon {
  background:#e8f2fa;
  color:#6c9ac8
}
.steps .health-metric-icon {
  background:#edf3e6;
  color:#90a76b
}
.health-metric-content h3 {
  font-size:15px;
  font-weight:650;
  margin:0
}
.health-metric-content>p {
  font-size:10px;
  color:var(--sub);
  margin:2px 0 9px
}
.health-metric-value {
  font-size:30px;
  font-weight:650;
  line-height:1.2;
  letter-spacing:-1px
}
.sleep .health-metric-value {
  font-size:27px
}
.health-metric-value small {
  font-size:12px;
  font-weight:400;
  margin-left:6px;
  letter-spacing:0;
  color:var(--sub)
}
.health-card-arrow {
  position:absolute;
  right:19px;
  top:19px;
  font-size:19px;
  color:#9faea7
}
.mini-wave {
  position:absolute;
  right:22px;
  bottom:20px;
  color:#e8efea
}
.mini-wave svg {
  width:66px;
  height:35px
}
.health-disclaimer {
  text-align:center;
  font-size:10px;
  color:#8b9990;
  margin:24px 0 0
}
.health-detail {
  max-width:970px
}
.health-detail-heading {
  position:relative;
  margin:20px 0 24px
}
.health-detail-heading h1 {
  font-size:32px;
  margin:6px 0 20px;
  display:flex;
  gap:10px;
  align-items:center
}
.health-title-icon {
  height:28px;
  width:28px;
  color:var(--tone);
  display:inline-flex
}
.health-period {
  display:flex;
  max-width:300px;
  padding:4px;
  background:#e8eeea;
  border:1px solid #e0e7e1;
  border-radius:12px;
  gap:4px
}
.health-period button {
  flex:1;
  background:none;
  border:0;
  color:#819086;
  cursor:pointer;
  padding:7px 20px;
  border-radius:9px;
  font-size:13px
}
.health-period button[aria-pressed=true] {
  background:white;
  color:#305345;
  font-weight:650;
  box-shadow:0 2px 8px #213a2210
}
#health-date-form {
  position:absolute;
  right:0;
  bottom:0;
  display:flex;
  align-items:end;
  gap:8px
}
#health-date-form label {
  font-size:10px;
  color:var(--sub);
  display:flex;
  flex-direction:column;
  gap:3px
}
#health-date-form input {
  padding:6px 10px;
  font-size:12px;
  border:1px solid #dce5dd;
  border-radius:8px;
  color:#526a5a;
  background:white;
  max-width:155px
}
#health-date-form button {
  font-size:12px;
  padding:7px 12px;
  background:#e5eee6;
  color:#486c53;
  border:1px solid #d8e3da;
  border-radius:8px;
  cursor:pointer
}
.health-panel {
  background:#fff;
  border:1px solid #e3ebe5;
  border-radius:20px;
  padding:26px;
  margin-bottom:20px;
  min-width:0;
  box-shadow:0 7px 24px #25472d05
}
.health-chart-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px
}
.health-chart-header>div>p {
  font-size:12px;
  color:var(--sub);
  margin:0 0 6px
}
.health-chart-header strong {
  font-size:38px;
  letter-spacing:-1.5px;
  font-weight:650;
  line-height:1.2
}
.health-chart-header>div>span {
  font-size:13px;
  color:var(--sub);
  margin-left:5px
}
.health-chart-header>p {
  font-size:11px;
  color:var(--sub);
  text-align:right;
  margin:0
}
.health-chart-header small {
  display:block;
  font-size:9px;
  color:#a0aca3;
  margin-top:4px
}
.health-chart {
  margin:18px -10px 0;
  min-width:0
}
.health-chart svg {
  width:100%;
  height:auto;
  display:block
}
.h-grid {
  stroke:#eaf0eb;
  stroke-dasharray:3 5
}
.h-axis {
  font-size:11px;
  fill:#8b9b8e
}
.h-line {
  fill:none;
  stroke:var(--tone);
  stroke-width:2.5;
  stroke-linejoin:round;
  stroke-linecap:round
}
.h-point {
  fill:#fff;
  stroke:var(--tone);
  stroke-width:2
}
.h-bar {
  fill:var(--tone);
  opacity:.78
}
.health-chart-legend {
  display:flex;
  justify-content:space-between;
  font-size:10px;
  color:#91a095;
  padding-top:4px
}
.health-chart-legend>span:first-child {
  display:flex;
  gap:6px;
  align-items:center
}
.health-chart-legend i {
  height:6px;
  width:6px;
  background:var(--tone);
  border-radius:50%
}
.health-panel-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:20px
}
.health-panel-heading h2 {
  font-size:16px;
  margin:0
}
.health-panel-heading>span {
  font-size:10px;
  color:var(--sub)
}
.health-stat-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px 12px;
  margin:0
}
.steps .health-stat-grid,.sleep .health-stat-grid {
  grid-template-columns:repeat(2,1fr)
}
.health-stat-grid dt {
  font-size:11px;
  color:var(--sub);
  margin-bottom:8px
}
.health-stat-grid dd {
  margin:0;
  font-size:25px;
  font-weight:600;
  line-height:1.4;
  letter-spacing:-.5px
}
.health-stat-grid dd small {
  font-weight:400;
  font-size:10px;
  color:var(--sub);
  margin-left:4px;
  letter-spacing:0
}
.health-footnote {
  font-size:10px;
  color:#87998d;
  line-height:1.8;
  margin:22px 0 0;
  border-top:1px solid #edf1ed;
  padding-top:14px
}
.health-analysis {
  background:#eaf1e8;
  border:1px solid #dfe8dc;
  padding:24px;
  border-radius:20px
}
.health-analysis .advice-heading h2 small {
  font-size:10px;
  color:#889a81;
  font-weight:400;
  margin-left:6px
}
.health-analysis>p {
  font-size:13px;
  line-height:1.9;
  color:#5b7556;
  margin:12px 0 18px
}
.health-analysis>span {
  font-size:10px;
  color:#84987c
}
.sleep-ai-card { overflow-wrap:anywhere }
.sleep-ai-card h3 { margin:14px 0 6px;font-size:14px;color:#354e30 }
.sleep-ai-card ul { margin:0 0 14px;padding-inline-start:20px;font-size:13px;line-height:1.65;color:#3e5740 }
.sleep-ai-card li+li { margin-top:4px }
.sleep-ai-card .sleep-ai-meta { font-size:12px;color:#4b6349;margin-block:8px }
.sleep-ai-card .sleep-ai-meta a { color:inherit;text-decoration:underline }
.sleep-ai-card .btn { min-height:44px }
.sleep-ai-local { margin-top:12px;font-size:12px;color:#4b6349 }
.sleep-ai-local summary { cursor:pointer;min-height:32px;align-content:center }
.health-empty {
  padding:40px 12px;
  text-align:center;
  color:var(--sub)
}
.health-empty>span {
  font-size:32px;
  color:#abc2ad
}
.health-empty h3 {
  font-size:15px;
  font-weight:500;
  margin:10px 0
}
.health-empty p {
  font-size:11px
}
.sleep {
  --tone:#9e8ac4
}
.oxygen {
  --tone:#6a9bc4
}
.steps {
  --tone:#96ae73
}
.sleep-day {
  padding-top:22px
}
.sleep-times {
  display:flex;
  justify-content:space-between
}
.sleep-times span {
  font-size:11px;
  color:var(--sub)
}
.sleep-times b {
  display:block;
  font-size:25px;
  color:#637167;
  font-weight:500
}
.sleep-day>p {
  font-size:10px;
  color:var(--sub);
  margin:20px 0 8px
}
.sleep-stages {
  display:flex;
  gap:3px;
  height:42px;
  overflow:hidden;
  border-radius:9px
}
.stage-0 {
  background:#7c68ad
}
.stage-1 {
  background:#b3a3d8
}
.stage-2 {
  background:#dbd1ee
}
.sleep-stage-labels {
  display:flex;
  justify-content:space-between;
  margin:16px 0 0;
  gap:8px
}
.sleep-stage-labels span {
  font-size:10px;
  color:var(--sub)
}
.sleep-stage-labels i {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:2px;
  margin-right:5px
}
.sleep-stage-labels b {
  display:block;
  font-size:12px;
  font-weight:500;
  color:#657465;
  margin-top:5px
}
.health-logout {
  display:block;
  margin:24px auto 0;
  background:white;
  border:1px solid #e6dcd7;
  color:#976b62;
  border-radius:12px;
  padding:10px 32px;
  font-size:13px;
  cursor:pointer
}
.health-app :focus-visible {
  outline:3px solid #6ba68a;
  outline-offset:4px
}
.health-profile .profile-page {
  margin:auto
}
.health-app .loading-panel {
  background:white;
  border:1px solid #e2ebe5;
  border-radius:20px;
  margin-top:20px
}
.health-app .error-panel {
  margin-top:20px
}
@media(min-width:750px) {
  .health-welcome {
    padding:26px 0 30px
  }
  .health-welcome h1 br {
    display:none
  }
  .health-intro-grid {
    grid-template-columns:1.1fr 1fr
  }
  .health-detail .health-main-chart {
    padding:30px 36px
  }
  .health-detail .health-chart svg {
    max-height:290px
  }
}
@media(max-width:600px) {
  .health-header-inner {
    height:66px;
    padding:0 22px
  }
  .health-wordmark {
    font-size:23px
  }
  .health-wordmark span {
    font-size:10px
  }
  .health-header-title {
    display:none
  }
  .health-avatar {
    width:35px;
    height:35px
  }
  .health-content {
    padding:22px 22px 32px
  }
  .health-home-title h2 {
    font-size:25px
  }
  .health-home-title>span {
    font-size:10px
  }
  .health-demo {
    font-size:9px;
    padding:8px 10px;
    line-height:1.6
  }
  .health-welcome {
    padding:24px 0
  }
  .health-welcome h1 {
    font-size:31px;
    margin:10px 0 14px;
    line-height:1.45
  }
  .health-welcome>p:not(.health-eyebrow),.health-welcome>span {
    font-size:11px
  }
  .health-intro-grid {
    grid-template-columns:1fr;
    gap:14px
  }
  .health-score-card {
    padding:20px;
    border-radius:19px
  }
  .health-score {
    width:125px;
    height:125px
  }
  .health-score-card h2 {
    font-size:17px
  }
  .health-score strong {
    font-size:37px
  }
  .health-score-caption {
    font-size:9px!important;
    margin-top:12px!important
  }
  .health-advice {
    padding:19px 20px;
    border-radius:18px
  }
  .health-advice>p {
    font-size:12px;
    margin:8px 0 12px
  }
  .advice-heading h2 {
    font-size:15px
  }
  .advice-foot {
    font-size:9px
  }
  .health-section-title {
    margin-top:25px
  }
  .health-section-title h2 {
    font-size:17px
  }
  .health-section-title>span {
    font-size:9px
  }
  .health-cards {
    grid-template-columns:1fr;
    gap:12px
  }
  .health-metric {
    min-height:128px;
    padding:20px;
    border-radius:19px
  }
  .health-metric-icon {
    height:43px;
    width:43px;
    margin-right:16px
  }
  .health-metric-value {
    font-size:29px
  }
  .sleep .health-metric-value {
    font-size:26px
  }
  .health-metric-content>p {
    margin-bottom:7px
  }
  .health-card-arrow {
    right:17px;
    top:17px
  }
  .health-detail-heading {
    margin:24px 0 20px
  }
  .health-detail-heading h1 {
    font-size:29px
  }
  .health-period {
    max-width:none
  }
  .health-period button {
    padding:7px 20px
  }
  #health-date-form {
    position:static;
    justify-content:space-between;
    margin-top:14px;
    align-items:center
  }
  #health-date-form label {
    flex-direction:row;
    gap:10px;
    align-items:center;
    font-size:11px
  }
  #health-date-form input {
    font-size:11px;
    max-width:145px
  }
  #health-date-form button {
    font-size:11px
  }
  .health-panel {
    padding:21px 18px;
    border-radius:18px;
    margin-bottom:14px
  }
  .health-chart-header {
    align-items:start
  }
  .health-chart-header strong {
    font-size:32px
  }
  .health-chart-header>p {
    font-size:9px;
    max-width:125px;
    line-height:1.8
  }
  .health-chart-header>div>p {
    font-size:11px
  }
  .health-chart-header>div>span {
    font-size:10px
  }
  .health-chart {
    margin:16px -8px 0
  }
  .h-axis {
    font-size:13px
  }
  .health-panel-heading h2 {
    font-size:15px
  }
  .health-panel-heading>span {
    font-size:8px
  }
  .health-stat-grid {
    gap:22px 8px;
    grid-template-columns:1fr 1fr
  }
  .health-stat-grid dt {
    font-size:10px;
    margin-bottom:6px
  }
  .health-stat-grid dd {
    font-size:23px
  }
  .health-stat-grid dd small {
    font-size:9px
  }
  .health-analysis {
    padding:20px;
    border-radius:18px
  }
  .health-analysis>p {
    font-size:12px
  }
  .health-footnote {
    font-size:9px
  }
  .health-profile {
    padding-left:0;
    padding-right:0
  }
  .health-profile>.health-demo {
    margin:0 22px
  }
  .health-detail .health-eyebrow {
    font-size:9px!important
  }
}
@media(prefers-reduced-motion:reduce) {
  .health-app * {
    animation:none!important;
    transition:none!important
  }
}
svg.sleep-stages {
  width:100%;
  display:block
}
.sleep-stages .stage-0 {
  fill:#7c68ad
}
.sleep-stages .stage-1 {
  fill:#b3a3d8
}
.sleep-stages .stage-2 {
  fill:#dbd1ee
}
#health-date-form label {
  white-space:nowrap
}
#health-date-form input {
  flex-shrink:1;
  min-width:0
}
@media(max-width:600px) {
  .h-axis {
    font-size:16px
  }
  .health-chart-header strong {
    font-size:30px
  }
}

.sleep-analysis-modes{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.sleep-analysis-modes [aria-pressed=true]{background:#e8dff4;border-color:#ac94c7;color:#73568f}
.sleep-demo-notice{padding:10px;border:1px dashed #aabacc;border-radius:10px;background:#f1f3fb;font-size:12px;line-height:1.8}
.sleep-manual-record{margin-top:14px;font-size:12px;line-height:1.8}
.sleep-manual-record label{display:grid;gap:5px;margin:10px 0}
.sleep-manual-record input,.sleep-manual-record select{width:100%;min-width:0;box-sizing:border-box;padding:9px;border-radius:8px;border:1px solid #d4e2d5;background:#fff;color:inherit}
.sleep-manual-record [role=alert]{color:#a65049}
