:root {
  --paper: #f5f2e9;
  --paper-2: #ece8dc;
  --card: #fffdf8;
  --ink: #17251d;
  --muted: #748078;
  --line: #e2dfd4;
  --green: #235a43;
  --green-2: #36765a;
  --lime: #dff47c;
  --lime-soft: #eff8c9;
  --peach: #ffb99a;
  --peach-soft: #ffebe1;
  --blue-soft: #dcebf1;
  --danger: #b85b48;
  --shadow: 0 18px 50px rgba(35, 55, 42, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: #e9e5db;
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 9% 9%, rgba(223, 244, 124, 0.28), transparent 26rem),
    radial-gradient(circle at 91% 91%, rgba(255, 185, 154, 0.2), transparent 24rem),
    var(--paper);
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(35, 90, 67, 0.24);
  outline-offset: 2px;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-a {
  top: -120px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(223, 244, 124, 0.2);
}

.ambient-b {
  bottom: 8%;
  left: -140px;
  width: 280px;
  height: 280px;
  background: rgba(255, 185, 154, 0.13);
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 22px 18px calc(112px + var(--safe-bottom));
}

@media (min-width: 720px) {
  .app-shell {
    margin-top: 22px;
    min-height: calc(100vh - 44px);
    border: 1px solid rgba(23, 37, 29, 0.08);
    border-radius: 38px;
    box-shadow: 0 40px 100px rgba(36, 47, 40, 0.13);
    padding-top: 30px;
  }

  .bottom-nav {
    max-width: 488px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 28px;
    border-radius: 26px;
    border: 1px solid rgba(23, 37, 29, 0.08);
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px 13px 13px 5px;
  background: var(--green);
  color: var(--lime);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  transform: rotate(-3deg);
}

.brand-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-copy strong {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 37, 29, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-weight: 700;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 9vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.subcopy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.text-button {
  border: 0;
  padding: 5px;
  background: transparent;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.card {
  border: 1px solid rgba(23, 37, 29, 0.07);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 10px 32px rgba(38, 55, 44, 0.045);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--green);
  color: #f9faef;
  box-shadow: 0 24px 55px rgba(35, 90, 67, 0.2);
}

.hero::before {
  position: absolute;
  top: -110px;
  right: -85px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(223, 244, 124, 0.22);
  border-radius: 50%;
  content: "";
}

.hero::after {
  position: absolute;
  right: 58px;
  bottom: -100px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(223, 244, 124, 0.08);
  content: "";
}

.hero-top,
.hero-main,
.hero-bottom {
  position: relative;
  z-index: 1;
}

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

.hero-label {
  color: rgba(249, 250, 239, 0.72);
  font-size: 12px;
  font-weight: 600;
}

.phase-pill {
  padding: 7px 10px;
  border: 1px solid rgba(223, 244, 124, 0.27);
  border-radius: 999px;
  background: rgba(223, 244, 124, 0.1);
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 18px 0 20px;
}

.weight-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.weight-value strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 14vw, 66px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.weight-value span {
  color: rgba(249, 250, 239, 0.72);
  font-family: Georgia, serif;
  font-size: 18px;
}

.weight-delta {
  min-height: 19px;
  margin-top: 9px;
  color: rgba(249, 250, 239, 0.73);
  font-size: 12px;
}

.weight-delta b {
  color: var(--lime);
}

.ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 9;
}

.ring-value {
  fill: none;
  stroke: var(--lime);
  stroke-linecap: round;
  stroke-width: 9;
  transition: stroke-dashoffset 600ms ease;
}

.ring-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-copy strong {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}

.ring-copy span {
  color: rgba(249, 250, 239, 0.65);
  font-size: 9px;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat {
  min-width: 0;
}

.hero-stat + .hero-stat {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat span {
  display: block;
  overflow: hidden;
  color: rgba(249, 250, 239, 0.58);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-stat strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

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

.quick-action {
  min-height: 88px;
  border: 1px solid rgba(23, 37, 29, 0.07);
  border-radius: 19px;
  background: var(--card);
  text-align: left;
  padding: 15px 12px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quick-action:active {
  transform: scale(0.97);
}

.quick-action.highlight {
  background: var(--lime);
}

.quick-action .q-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 10px;
  background: rgba(35, 90, 67, 0.08);
}

.quick-action.highlight .q-icon {
  background: rgba(35, 90, 67, 0.12);
}

.quick-action strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.quick-action span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.calorie-card {
  padding: 20px;
}

.calorie-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.calorie-number {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.calorie-number small {
  color: var(--muted);
  font-family: "PingFang SC", sans-serif;
  font-size: 11px;
}

.calorie-copy {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.progress-bar {
  overflow: hidden;
  height: 10px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--paper-2);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 500ms ease;
}

.progress-fill.over {
  background: var(--peach);
}

.macro-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.macro {
  padding: 10px;
  border-radius: 13px;
  background: #f7f5ee;
  text-align: center;
}

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

.macro strong {
  display: block;
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 500;
}

.calorie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.calorie-foot strong {
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

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

.meal-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(23, 37, 29, 0.065);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.8);
  text-align: left;
  cursor: pointer;
}

.meal-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: var(--paper-2);
}

.meal-copy {
  min-width: 0;
}

.meal-copy strong {
  display: block;
  font-size: 14px;
}

.meal-copy span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-kcal {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 15px;
}

.meal-kcal b {
  color: var(--ink);
  font-size: 20px;
  font-weight: 500;
}

.motivation {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  padding: 20px;
  border-radius: 22px;
  background: var(--peach-soft);
}

.motivation::after {
  position: absolute;
  top: -32px;
  right: -20px;
  color: rgba(184, 91, 72, 0.09);
  font-family: Georgia, serif;
  font-size: 120px;
  content: "”";
}

.motivation strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 6px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
}

.motivation p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #7f5c50;
  font-size: 12px;
  line-height: 1.7;
}

.streak {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.55);
}

.streak-flame {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--peach-soft);
}

.streak strong {
  font-size: 13px;
}

.streak p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  left: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(calc(100% - 24px), 496px);
  height: 72px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(23, 37, 29, 0.08);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 45px rgba(36, 47, 40, 0.13);
  backdrop-filter: blur(20px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: #8b958e;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.nav-item.active {
  background: var(--green);
  color: var(--lime);
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.screen-enter {
  animation: screenIn 300ms ease both;
}

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

.record-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--card);
}

.record-date-row button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--paper-2);
  cursor: pointer;
}

.record-date-row strong {
  font-size: 13px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
}

.input-wrap input,
.field > input,
.field > select,
.field > textarea,
.input-wrap select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf5;
  color: var(--ink);
  font-size: 15px;
}

.input-wrap input {
  padding-right: 42px;
}

.input-unit {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  font-size: 11px;
  transform: translateY(-50%);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 15px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.primary-button.lime {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--green);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.ghost-button {
  border: 0;
  background: transparent;
  color: var(--green);
}

.danger-button {
  border: 1px solid rgba(184, 91, 72, 0.2);
  background: #fff7f3;
  color: var(--danger);
}

.wide {
  width: 100%;
}

.add-meal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.add-meal-card {
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
}

.add-meal-card.active {
  border-color: var(--green);
  background: var(--lime-soft);
}

.add-meal-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.add-meal-card strong {
  display: block;
  margin-top: 18px;
  font-family: "Songti SC", serif;
  font-size: 17px;
}

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

.entry-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 15px;
  background: var(--card);
}

.entry-thumb {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border-radius: 13px;
  background: var(--paper-2);
  color: var(--green);
  font-size: 18px;
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-copy {
  min-width: 0;
}

.entry-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.entry-kcal {
  color: var(--muted);
  font-size: 10px;
}

.entry-kcal b {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.empty-state {
  padding: 30px 20px;
  border: 1px dashed #d5d2c7;
  border-radius: 19px;
  color: var(--muted);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 18px;
  background: var(--lime-soft);
  color: var(--green);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.segment {
  display: flex;
  gap: 5px;
  padding: 4px;
  border-radius: 14px;
  background: var(--paper-2);
}

.segment button {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.segment button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(23, 37, 29, 0.06);
}

.chart-card {
  padding: 18px;
}

.chart-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
}

.chart-summary strong {
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: 500;
}

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

.chart-change {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--green) !important;
  font-weight: 700;
}

.chart-change.up {
  background: var(--peach-soft);
  color: var(--danger) !important;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid-line {
  stroke: #e9e6dc;
  stroke-dasharray: 3 5;
}

.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-area {
  fill: url(#areaGradient);
}

.chart-dot {
  fill: var(--card);
  stroke: var(--green);
  stroke-width: 2.5;
}

.chart-label {
  fill: var(--muted);
  font-family: "PingFang SC", sans-serif;
  font-size: 9px;
}

.bar-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 170px;
  padding-top: 20px;
  border-bottom: 1px solid var(--line);
}

.cal-bar-col {
  display: grid;
  height: 100%;
  grid-template-rows: 1fr auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
}

.cal-bar-track {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}

.cal-bar {
  position: relative;
  width: min(100%, 24px);
  min-height: 3px;
  border-radius: 7px 7px 2px 2px;
  background: var(--lime);
}

.cal-bar.over {
  background: var(--peach);
}

.cal-bar-value {
  position: absolute;
  top: -16px;
  left: 50%;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 8px;
  transform: translateX(-50%);
}

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

.target-line {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px dashed #bac2bb;
  pointer-events: none;
}

.target-line span {
  position: absolute;
  top: -15px;
  right: 0;
  padding-left: 5px;
  background: var(--card);
  color: var(--muted);
  font-size: 8px;
}

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

.mini-stat {
  padding: 14px 10px;
  border-radius: 15px;
  background: var(--card);
  text-align: center;
}

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

.mini-stat strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.waist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 3px;
  border-bottom: 1px solid var(--line);
}

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

.waist-row span {
  color: var(--muted);
  font-size: 12px;
}

.waist-row strong {
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
}

.plan-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  background: var(--lime);
}

.plan-hero::after {
  position: absolute;
  right: -20px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  border: 25px solid rgba(35, 90, 67, 0.08);
  border-radius: 50%;
  content: "";
}

.plan-hero > * {
  position: relative;
  z-index: 1;
}

.plan-weight {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 13px 0 17px;
}

.plan-weight strong {
  font-family: Georgia, serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.plan-weight span {
  color: var(--green-2);
  font-size: 13px;
}

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

.plan-split div {
  padding: 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.46);
}

.plan-split span {
  display: block;
  color: var(--green-2);
  font-size: 9px;
}

.plan-split strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 15px;
}

.info-banner {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 11px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--blue-soft);
}

.info-banner .b-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  color: #355f71;
}

.info-banner strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.info-banner p {
  margin: 0;
  color: #59717c;
  font-size: 10px;
  line-height: 1.55;
}

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

.budget-item {
  padding: 13px 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  text-align: center;
}

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

.budget-item strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.habit-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.habit-card:last-child {
  border-bottom: 0;
}

.habit-check {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d7d4c9;
  border-radius: 9px;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

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

.habit-copy strong {
  display: block;
  font-size: 13px;
}

.habit-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.drink-card {
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
  background: #24352d;
  color: #f7f8ee;
}

.drink-card .eyebrow {
  color: var(--peach);
}

.drink-card h3 {
  color: #fff;
}

.drink-card p {
  margin-bottom: 13px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.65;
}

.swap-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 10px;
}

.swap-row span {
  color: rgba(255, 255, 255, 0.63);
}

.swap-row b {
  color: var(--lime);
  font-weight: 600;
}

.swap-row strong {
  color: #fff;
  font-weight: 600;
  text-align: right;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(16, 25, 20, 0.42);
  backdrop-filter: blur(7px);
  animation: fadeIn 180ms ease both;
}

.modal {
  width: min(100%, 496px);
  max-height: min(88dvh, 820px);
  overflow: hidden;
  border-radius: 29px;
  background: var(--paper);
  box-shadow: 0 30px 90px rgba(11, 24, 17, 0.25);
  animation: sheetUp 240ms cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.modal-handle {
  width: 40px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: #d5d1c6;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px 12px;
}

.modal-head h2 {
  margin: 0;
  font-size: 22px;
}

.modal-close {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper-2);
  cursor: pointer;
}

.modal-body {
  max-height: calc(88dvh - 137px);
  overflow-y: auto;
  padding: 0 20px 20px;
  overscroll-behavior: contain;
}

.modal-footer {
  padding: 11px 20px calc(20px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.photo-drop {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #b8b9ae;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(223, 244, 124, 0.14), transparent),
    var(--card);
  text-align: center;
  cursor: pointer;
}

.photo-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.camera-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 22px;
  background: var(--green);
  color: var(--lime);
}

.photo-drop strong {
  display: block;
  font-size: 15px;
}

.photo-drop p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.photo-preview {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(16, 25, 20, 0.72);
  color: #fff;
  backdrop-filter: blur(12px);
}

.photo-overlay span {
  font-size: 10px;
}

.photo-overlay button {
  border: 0;
  background: transparent;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.ai-setup {
  margin-top: 12px;
  padding: 15px;
  border-radius: 16px;
  background: var(--lime-soft);
}

.ai-setup strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.ai-setup p {
  margin: 0 0 10px;
  color: #5e6a52;
  font-size: 10px;
  line-height: 1.6;
}

.loading-box {
  display: grid;
  min-height: 220px;
  place-items: center;
  text-align: center;
}

.scanner {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 22px;
  border: 2px solid var(--green);
  border-radius: 26px;
}

.scanner::before {
  position: absolute;
  right: 7px;
  left: 7px;
  height: 2px;
  background: var(--lime);
  box-shadow: 0 0 15px var(--lime);
  content: "";
  animation: scan 1.7s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 10px; }
  50% { top: 78px; }
}

.loading-box strong {
  display: block;
  margin-bottom: 6px;
}

.loading-box span {
  color: var(--muted);
  font-size: 11px;
}

.analysis-head {
  display: flex;
  gap: 13px;
  margin-bottom: 14px;
}

.analysis-head img {
  width: 82px;
  height: 82px;
  border-radius: 17px;
  object-fit: cover;
}

.analysis-title {
  flex: 1;
}

.analysis-title strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.analysis-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.analysis-total {
  margin-top: 10px;
  font-family: Georgia, serif;
  font-size: 30px;
}

.analysis-total small {
  color: var(--muted);
  font-family: "PingFang SC", sans-serif;
  font-size: 10px;
}

.food-items {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--card);
}

.food-item span {
  font-size: 12px;
}

.food-item strong {
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

.confidence {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.common-food-search {
  position: relative;
  margin-bottom: 11px;
}

.common-food-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--muted);
  transform: translateY(-50%);
}

.common-food-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px 11px 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.food-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.food-chip {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 10px;
  cursor: pointer;
}

.food-chip.selected {
  border-color: var(--green);
  background: var(--lime-soft);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}

.settings-profile {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 19px;
  background: var(--green);
  color: var(--lime);
  font-family: "Songti SC", serif;
  font-size: 23px;
}

.settings-profile strong {
  display: block;
  font-family: "Songti SC", serif;
  font-size: 19px;
}

.settings-profile span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.settings-list {
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
}

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

.settings-row-copy strong {
  display: block;
  font-size: 12px;
}

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

.settings-row > span {
  color: var(--muted);
  font-size: 11px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

.helper {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.api-note {
  padding: 13px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: #506c78;
  font-size: 10px;
  line-height: 1.6;
}

.api-note a {
  color: #2d667e;
  font-weight: 700;
}

.steps-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.6;
}

.step-num {
  display: grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: calc(96px + var(--safe-bottom));
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #1d2c24;
  color: #fff;
  font-size: 11px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.danger-text {
  color: var(--danger) !important;
}

.green-text {
  color: var(--green) !important;
}

@media (max-width: 360px) {
  .app-shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .quick-action {
    padding: 13px 9px;
  }

  .quick-action span {
    display: none;
  }

  .budget-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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