:root {
  --bg: #f4f6f2;
  --card: #ffffff;
  --ink: #17211b;
  --sub: #5d6a61;
  --muted: #8b958e;
  --line: #e8ece7;
  --green: #2f6b4f;
  --green-deep: #1f4d37;
  --green-soft: #e4efe8;
  --amber: #a96812;
  --amber-soft: #fbf0df;
  --red: #b64235;
  --red-soft: #f9e6e3;
  --blue: #356b88;
  --blue-soft: #e8f1f6;
  --shadow: 0 10px 30px rgba(29, 48, 37, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 10%, #f7f9f5 0, #e9ede8 45%, #dfe5df 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 84px;
  padding: 40px;
}

.stage-copy {
  width: 360px;
}

.stage-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--green);
  font-weight: 700;
}

.stage-mark::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.stage-copy h1 {
  margin: 18px 0 12px;
  font-size: 58px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.stage-copy p {
  margin: 0;
  color: var(--sub);
  font-size: 15px;
  line-height: 1.8;
}

.stage-copy .stage-hint {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #d6ddd6;
  font-size: 12px;
  color: var(--muted);
  max-width: 300px;
}

.phone {
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 48px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 90px rgba(23, 42, 31, 0.25), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
  flex-shrink: 0;
}

.statusbar {
  height: 48px;
  padding: 15px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.4px;
  position: relative;
  z-index: 2;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.signal {
  width: 15px;
  height: 9px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  border-radius: 1px;
  transform: skewY(-28deg);
}

.wifi {
  width: 13px;
  height: 9px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.battery {
  width: 20px;
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: var(--ink);
  border-radius: 1px;
}

.battery::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.app {
  height: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding-bottom: 96px;
  padding: 14px 16px 96px;
  scrollbar-width: none;
}

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

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(232, 236, 231, 0.9);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 20;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #8c958e;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.nav-item svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active {
  color: var(--green);
  font-weight: 650;
}

.page {
  animation: rise 0.35s ease both;
}

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

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

.eyebrow {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.8px;
}

.page-head h1,
.page-title {
  margin: 3px 0 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.date-line {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 5px 14px rgba(47, 107, 79, 0.14);
}

.card {
  background: var(--card);
  border: 1px solid rgba(232, 236, 231, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.section-title {
  margin: 0;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.2px;
}

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

.link {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
}

.score-card {
  margin-top: 17px;
  padding: 18px 17px 15px;
  position: relative;
  overflow: hidden;
}

.score-card::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -50px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 107, 79, 0.09), transparent 68%);
  pointer-events: none;
}

.score-top {
  display: flex;
  align-items: center;
}

.ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  padding: 8px;
  flex-shrink: 0;
}

.ring-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(29, 48, 37, 0.07);
}

.score-num {
  font-size: 34px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -1px;
}

.score-unit {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 2px;
}

.score-copy {
  flex: 1;
  min-width: 0;
  margin-left: 14px;
}

.score-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.score-label {
  font-size: 19px;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pill-green {
  background: var(--green-soft);
  color: var(--green);
}

.pill-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill-red {
  background: var(--red-soft);
  color: var(--red);
}

.score-desc {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--sub);
}

.score-note {
  margin-top: 5px;
  font-size: 9px;
  color: var(--muted);
}

.score-parts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 18px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.part-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10px;
}

.part-label {
  color: var(--sub);
}

.part-num {
  font-weight: 650;
  font-size: 10px;
}

.part-num span {
  color: var(--muted);
  font-weight: 400;
}

.part-track {
  height: 4px;
  margin-top: 4px;
  background: #eef1ed;
  border-radius: 999px;
  overflow: hidden;
}

.part-fill {
  height: 100%;
  border-radius: 999px;
}

.alert {
  margin-top: 13px;
  padding: 14px 15px;
  border-radius: 17px;
  border: 1px solid transparent;
  cursor: pointer;
}

.alert-warning {
  background: linear-gradient(135deg, #fcf3e5, #fffaf2);
  border-color: #f0dfc4;
}

.alert-danger {
  background: linear-gradient(135deg, #fbedeb, #fff8f6);
  border-color: #f2d5d0;
}

.alert-info {
  background: linear-gradient(135deg, #edf3f7, #f9fcfd);
  border-color: #dce8ef;
}

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

.alert-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.alert-warning .alert-kicker {
  color: var(--amber);
}

.alert-danger .alert-kicker {
  color: var(--red);
}

.alert-info .alert-kicker {
  color: var(--blue);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.alert-count {
  font-size: 9.5px;
  color: var(--muted);
}

.alert-title {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.alert-detail {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--sub);
}

.alert-action {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

.alert-warning .alert-action {
  color: var(--amber);
}

.alert-danger .alert-action {
  color: var(--red);
}

.alert-info .alert-action {
  color: var(--blue);
}

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

.metric {
  padding: 13px 13px 12px;
  min-height: 112px;
}

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

.metric-label {
  font-size: 10.5px;
  color: var(--sub);
  font-weight: 600;
}

.metric-mark {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
}

.mark-green {
  background: var(--green-soft);
  color: var(--green);
}

.mark-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.mark-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 7px;
  white-space: nowrap;
}

.metric-value strong {
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.8px;
}

.metric-value span {
  font-size: 9.5px;
  color: var(--muted);
}

.metric-foot {
  margin-top: 4px;
  min-height: 15px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.35;
}

.metric-foot.green {
  color: var(--green);
}

.metric-foot.amber {
  color: var(--amber);
}

.mini-track {
  height: 4px;
  border-radius: 999px;
  background: #eff2ee;
  overflow: hidden;
  margin-top: 7px;
}

.mini-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.water-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.water-btn {
  flex-shrink: 0;
  margin-top: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.activity-strip {
  display: flex;
  align-items: center;
  padding: 12px 6px;
  margin-top: 10px;
}

.activity-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.activity-item strong {
  font-size: 17px;
  letter-spacing: -0.4px;
}

.activity-item span {
  font-size: 9px;
  color: var(--muted);
}

.activity-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.plan-card {
  padding: 14px 14px 4px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: #edf0ec;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.progress-text {
  width: 34px;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid #cbd4cc;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.check.done {
  background: var(--green);
  border-color: var(--green);
}

.plan-copy {
  flex: 1;
  min-width: 0;
}

.plan-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.plan-meta {
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phase-card {
  margin-top: 11px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(135deg, #356f54, #1f4d37);
  border: 0;
  box-shadow: 0 10px 24px rgba(31, 77, 55, 0.22);
  cursor: pointer;
}

.phase-week {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phase-week strong {
  font-size: 20px;
  line-height: 1;
}

.phase-week span {
  font-size: 8px;
  opacity: 0.68;
  margin-top: 2px;
}

.phase-copy {
  flex: 1;
  min-width: 0;
}

.phase-kicker {
  font-size: 12px;
  font-weight: 650;
}

.phase-focus {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.45;
  opacity: 0.72;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chev {
  font-size: 22px;
  opacity: 0.5;
}

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

.quick {
  background: #fff;
  border: 1px solid rgba(232, 236, 231, 0.95);
  border-radius: 15px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 5px 14px rgba(29, 48, 37, 0.04);
  cursor: pointer;
}

.quick:active {
  background: #fafbf9;
}

.quick-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.quick span {
  font-size: 10px;
  color: var(--sub);
}

.disclaimer {
  margin-top: 20px;
  padding: 0 6px;
  text-align: center;
  font-size: 9px;
  line-height: 1.7;
  color: #a0a9a2;
}

.tone-green {
  background: var(--green-soft);
  color: var(--green);
}

.tone-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.tone-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tone-red {
  background: var(--red-soft);
  color: var(--red);
}

/* Plan */
.hero {
  margin-top: 16px;
  padding: 18px 17px 16px;
  border-radius: 22px;
  background: linear-gradient(140deg, #356f54, #24533c 55%, #1b402f);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(28, 68, 48, 0.24);
}

.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  top: -100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 2px;
  opacity: 0.62;
  position: relative;
}

.hero h2 {
  margin: 9px 0 0;
  font-size: 23px;
  line-height: 1.3;
  position: relative;
}

.hero p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.6;
  opacity: 0.76;
  position: relative;
}

.hero-track {
  height: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  margin-top: 15px;
  overflow: hidden;
  position: relative;
}

.hero-fill {
  height: 100%;
  background: #b7d8c2;
  border-radius: 999px;
}

.week-card {
  padding: 12px 6px 10px;
  display: flex;
  justify-content: space-between;
}

.week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  border-radius: 10px;
  cursor: pointer;
}

.week-day.selected {
  background: #f3f7f3;
}

.week-label {
  font-size: 9px;
  color: var(--muted);
}

.week-label.today {
  color: var(--green);
  font-weight: 700;
}

.week-dot {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e1e7e1;
  background: #fafbf9;
  font-size: 11px;
  color: var(--sub);
}

.week-dot.full {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.week-dot.partial {
  background: var(--green-soft);
  border-color: #b9d4c2;
  color: var(--green);
}

.week-mini {
  width: 22px;
  height: 2px;
  background: #eef1ed;
  border-radius: 999px;
  overflow: hidden;
}

.week-mini i {
  display: block;
  height: 100%;
  background: var(--green);
}

.group {
  margin-top: 13px;
}

.group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 6px;
}

.group-name {
  font-size: 13px;
  font-weight: 650;
}

.group-name span {
  margin-left: 6px;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
}

.group-count {
  font-size: 9.5px;
  color: var(--muted);
}

.group-card {
  padding: 0 14px;
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

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

.row.done .plan-title {
  color: #a7b0a9;
  text-decoration: line-through;
}

.row.done .plan-meta {
  color: #b3bbb5;
}

.meal-card {
  padding: 4px 15px 12px;
}

.meal-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.meal-row:last-of-type {
  border-bottom: 0;
}

.meal-tag {
  flex-shrink: 0;
  width: 38px;
  text-align: center;
  border-radius: 6px;
  padding: 2px 0;
  font-size: 9.5px;
  font-weight: 650;
  margin-top: 1px;
}

.meal-tag.breakfast {
  background: var(--amber-soft);
  color: var(--amber);
}

.meal-tag.lunch {
  background: var(--green-soft);
  color: var(--green);
}

.meal-tag.dinner {
  background: var(--blue-soft);
  color: var(--blue);
}

.meal-tag.snack {
  background: #f2f0f7;
  color: #6f6290;
}

.meal-text {
  flex: 1;
  font-size: 11px;
  line-height: 1.6;
  color: var(--sub);
}

.meal-note {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f7f8f5;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
}

.focus-card {
  padding: 16px;
}

.focus-item {
  position: relative;
  padding-left: 12px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--sub);
}

.focus-item::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.focus-item:first-child {
  margin-top: 0;
}

.focus-tip {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Trends */
.range-switch {
  display: flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 2px;
  margin-top: 6px;
}

.range-item {
  padding: 6px 7px;
  border-radius: 7px;
  font-size: 9px;
  color: var(--muted);
  cursor: pointer;
}

.range-item.active {
  background: var(--green);
  color: #fff;
  font-weight: 650;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 15px -16px 0;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  font-size: 10.5px;
  cursor: pointer;
}

.chip.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 650;
}

.chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.chart-card {
  margin-top: 10px;
  padding: 15px 13px 11px;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 2px;
}

.chart-head h3 {
  margin: 0;
  font-size: 16px;
}

.chart-head h3 span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}

.chart-head p {
  margin: 2px 0 0;
  font-size: 9.5px;
  color: var(--muted);
}

.chart-add {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9.5px;
  font-weight: 650;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 4px;
}

.chart-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 3px;
  font-size: 8.5px;
  color: var(--muted);
}

.legend-line {
  display: inline-block;
  width: 12px;
  height: 3px;
  border-radius: 99px;
  margin-right: 4px;
}

.legend-dash {
  display: inline-block;
  width: 12px;
  border-top: 1.5px dashed #c7a46b;
  margin-right: 4px;
  vertical-align: middle;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.stat-card {
  padding: 11px 12px;
}

.stat-card span {
  display: block;
  font-size: 9px;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  letter-spacing: -0.4px;
}

.stat-card strong em {
  font-style: normal;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 2px;
}

.good {
  color: var(--green);
}

.warn {
  color: var(--amber);
}

.muted {
  color: var(--muted);
}

.insight {
  margin-top: 9px;
  padding: 12px 13px;
  border-radius: 15px;
  background: #f0f5f1;
  border: 1px solid #dfeae2;
}

.insight b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--green);
}

.insight i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-style: italic;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insight p {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--sub);
}

.report-card {
  padding: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.report-stat {
  background: #f8f9f6;
  border-radius: 9px;
  padding: 8px 9px;
}

.report-stat span {
  display: block;
  font-size: 8.5px;
  color: var(--muted);
}

.report-stat strong {
  display: block;
  margin-top: 1px;
  font-size: 14px;
}

.report-block {
  margin-top: 12px;
}

.report-block h4 {
  margin: 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.report-block h4 i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.report-block h4.focus i {
  background: var(--amber);
}

.report-block h4.action i {
  background: var(--blue);
}

.report-block p {
  margin: 4px 0 0;
  padding-left: 10px;
  position: relative;
  font-size: 10px;
  line-height: 1.6;
  color: var(--sub);
}

.report-block p::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #c7d0c9;
}

.report-foot {
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  color: var(--muted);
  text-align: center;
}

/* Record */
.record-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.date-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  color: var(--sub);
}

.micro-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  color: var(--muted);
}

.micro-summary strong {
  color: var(--ink);
  font-size: 13px;
  margin-right: 2px;
}

.type-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 14px -16px 0;
  padding: 0 16px 4px;
  scrollbar-width: none;
}

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

.type-chip {
  flex-shrink: 0;
  width: 42px;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--sub);
  cursor: pointer;
}

.type-chip b {
  font-size: 11px;
}

.type-chip span {
  font-size: 8.5px;
}

.type-chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 6px 14px rgba(47, 107, 79, 0.2);
}

.form-card {
  margin-top: 10px;
  padding: 16px 14px;
}

.form-card h3 {
  margin: 0;
  font-size: 16px;
}

.form-card .form-desc {
  margin: 3px 0 12px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--muted);
}

.big-input {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8f5;
}

.big-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

.big-input span {
  font-size: 10px;
  color: var(--muted);
}

.form-hint {
  margin-top: 8px;
  font-size: 9px;
  line-height: 1.6;
  color: var(--muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 43px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 7px 15px rgba(47, 107, 79, 0.18);
}

.btn-primary:active {
  opacity: 0.85;
}

.save-btn {
  margin-top: 13px;
}

.records {
  padding: 0 13px;
}

.rec {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rec:last-child {
  border-bottom: 0;
}

.rec-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.rec-main {
  flex: 1;
  min-width: 0;
}

.rec-top {
  display: flex;
  gap: 7px;
  align-items: baseline;
}

.rec-label {
  font-size: 10px;
  color: var(--sub);
}

.rec-time {
  font-size: 8.5px;
  color: var(--muted);
}

.rec-value {
  margin-top: 1px;
  font-size: 13px;
  font-weight: 650;
}

.rec-note {
  margin-top: 1px;
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}

.empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}

/* Profile */
.profile-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 2px 0;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: linear-gradient(135deg, #e4efe8, #d3e6da);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 79, 0.14);
}

.profile-id {
  flex: 1;
  min-width: 0;
}

.profile-id h1 {
  margin: 0;
  font-size: 22px;
}

.profile-meta {
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--muted);
}

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

.tag {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 8.5px;
  color: var(--sub);
}

.edit-btn {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 9.5px;
  color: var(--sub);
}

.goal-card {
  margin-top: 14px;
  padding: 15px;
}

.goal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.goal-head small {
  font-size: 9.5px;
  color: var(--muted);
}

.goal-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.goal-percent {
  font-size: 23px;
  font-weight: 700;
  color: var(--green);
}

.goal-percent span {
  font-size: 10px;
}

.goal-numbers {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
}

.goal-numbers small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}

.goal-numbers strong {
  font-size: 27px;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.goal-numbers strong span {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 2px;
}

.goal-target {
  text-align: right;
}

.goal-arrow {
  color: #b9c3bb;
  font-size: 17px;
  padding: 0 12px 7px;
}

.goal-track {
  height: 6px;
  border-radius: 999px;
  background: #edf0ec;
  overflow: hidden;
  margin-top: 9px;
}

.goal-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ca184, #2f6b4f);
}

.goal-meta {
  margin-top: 6px;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--sub);
}

.goal-note {
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

.stats-strip {
  display: flex;
  align-items: center;
  padding: 11px 4px;
  margin-top: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.profile-stat {
  flex: 1;
  text-align: center;
}

.profile-stat strong {
  display: block;
  font-size: 18px;
}

.profile-stat span {
  display: block;
  font-size: 8.5px;
  color: var(--muted);
}

.profile-stat strong em {
  font-style: normal;
  font-size: 9px;
  color: var(--muted);
}

.menu-card {
  padding: 0 14px;
}

.menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.menu-copy {
  flex: 1;
}

.menu-copy b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.menu-copy span {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: var(--muted);
}

.menu-chev {
  color: #c0c8c1;
  font-size: 18px;
}

.privacy {
  margin-top: 13px;
  padding: 12px 13px;
  border-radius: 12px;
  background: #eef3ee;
}

.privacy b {
  font-size: 10px;
  color: var(--green);
}

.privacy p {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.65;
  color: var(--sub);
}

.version {
  margin-top: 16px;
  text-align: center;
  font-size: 8.5px;
  color: #a8b1aa;
}

/* modal + loading */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 19, 0.48);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(350px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.modal-card h3 {
  margin: 0;
  font-size: 16px;
}

.modal-card p {
  margin: 8px 0 16px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--sub);
  white-space: pre-wrap;
}

.loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.loading-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #dfe6df;
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}

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

.error {
  padding: 30px 20px;
  text-align: center;
}

.error h2 {
  margin: 0;
  font-size: 18px;
}

.error p {
  margin: 8px 0 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--red);
  word-break: break-all;
}

@media (max-width: 900px) {
  body {
    background: var(--bg);
  }

  .stage {
    padding: 0;
    min-height: 100dvh;
  }

  .stage-copy {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .statusbar {
    height: 44px;
    padding-top: 12px;
  }

  .app {
    height: calc(100% - 44px);
  }

  .modal {
    padding: 16px;
  }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translate(-50%, 12px);
  background: rgba(23, 33, 27, 0.9);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 80;
}

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