:root {
  --bg-top: #dceee7;
  --bg-mid: #eef5f1;
  --bg-bottom: #f7f3ea;
  --ink: #1a2e2a;
  --muted: #5d726c;
  --brand: #1f4d45;
  --brand-soft: #2f6a5e;
  --accent: #c47a3a;
  --accent-soft: #f0ddc4;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(31, 77, 69, 0.12);
  --good: #2f6a5e;
  --warn: #9a6b2f;
  --shadow: 0 18px 40px rgba(26, 46, 42, 0.08);
  --radius: 22px;
  --nav-h: 84px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 70% at 10% -10%, #cfe7df 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 0%, #f1e5cf 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 42%, var(--bg-bottom));
  background-attachment: fixed;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

#app {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.screen {
  padding: 20px 18px calc(var(--nav-h) + var(--safe-bottom) + 20px);
  animation: rise 0.35s ease both;
}

.screen.no-nav {
  padding-bottom: 28px;
}

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

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

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

@keyframes soft-breath {
  0%,
  100% {
    opacity: 0.92;
  }
  50% {
    opacity: 1;
  }
}

@keyframes mark-settle {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Quiet cascade when a screen opens */
.stack > .card {
  animation: soft-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stack > .card:nth-child(1) {
  animation-delay: 0.02s;
}
.stack > .card:nth-child(2) {
  animation-delay: 0.07s;
}
.stack > .card:nth-child(3) {
  animation-delay: 0.12s;
}
.stack > .card:nth-child(4) {
  animation-delay: 0.17s;
}
.stack > .card:nth-child(5) {
  animation-delay: 0.22s;
}
.stack > .card:nth-child(6) {
  animation-delay: 0.27s;
}
.stack > .card:nth-child(7) {
  animation-delay: 0.32s;
}
.stack > .card:nth-child(n + 8) {
  animation-delay: 0.36s;
}

.brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2rem, 8vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--brand);
  margin: 0;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.brand-mark {
  display: block;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 650;
  font-size: clamp(2.55rem, 10vw, 3.35rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--brand);
}

.brand-mark em {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--brand-soft);
}

.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.25;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.lede {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.5;
  max-width: 34ch;
}

.food-coach-greet {
  font-size: clamp(1.85rem, 7vw, 2.35rem);
}

.food-coach-lede {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 32ch;
}

.food-coach-cal {
  color: var(--ink);
  font-weight: 600;
}

.food-coach-nudge {
  color: var(--muted);
  animation: thought-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.food-coach-prefs {
  margin-top: 0.55rem;
}

.hero-panel {
  margin-top: 1.15rem;
  min-height: 148px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(31, 77, 69, 0.92), rgba(58, 122, 108, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ccircle cx='20' cy='20' r='2' fill='%23ffffff' opacity='0.12'/%3E%3Ccircle cx='80' cy='60' r='1.5' fill='%23ffffff' opacity='0.1'/%3E%3Ccircle cx='130' cy='30' r='2.2' fill='%23ffffff' opacity='0.08'/%3E%3C/svg%3E");
  color: #f7faf8;
  padding: 1rem 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 231, 201, 0.35), transparent 70%);
  animation: drift 8s ease-in-out infinite alternate;
}

.hero-illus {
  position: relative;
  z-index: 1;
  width: min(100%, 220px);
  height: auto;
  margin-left: auto;
  opacity: 0.95;
}

.hero-sun {
  animation: sun-glow 5.5s ease-in-out infinite alternate;
  transform-origin: 118px 22px;
}

.hero-leaf-a {
  animation: leaf-sway 6s ease-in-out infinite alternate;
  transform-origin: 50px 58px;
}

.hero-leaf-b {
  animation: leaf-sway 7s ease-in-out infinite alternate-reverse;
  transform-origin: 70px 62px;
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-18px, 22px);
  }
}

@keyframes sun-glow {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes leaf-sway {
  from {
    transform: rotate(-2deg) translateY(0);
  }
  to {
    transform: rotate(3deg) translateY(-2px);
  }
}

.hero-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  max-width: 24ch;
}

.hero-panel strong {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.28rem;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card h2 {
  font-size: 1.35rem;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.stat-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.stat {
  padding: 1rem;
}

.stat .value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 650;
  color: var(--brand);
  line-height: 1;
}

.stat .value.big,
.hero-stats .value.big {
  font-size: 2.35rem;
}

.hero-stats .value,
.water-card .value {
  font-family: var(--font-display);
  font-weight: 650;
  color: var(--brand);
  line-height: 1;
}

.water-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0.65rem;
}

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

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

.height-part {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.55rem 0.15rem 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.height-part input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

.height-part span {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
  padding-right: 0.35rem;
}

.calorie-suggest {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.07);
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.calorie-suggest .suggest-line {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
}

.calorie-suggest .btn {
  width: 100%;
}

.fit-note {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.08);
  color: var(--brand);
  font-weight: 600;
  line-height: 1.4;
}

.fit-note.warn {
  background: rgba(154, 107, 47, 0.14);
  color: #6a4320;
}

.coach-note.accountable {
  background: linear-gradient(160deg, rgba(107, 74, 42, 0.95), rgba(138, 96, 55, 0.88));
}

.nav button {
  font-size: 0.78rem;
}

.chip {
  min-height: 48px;
  font-size: 1rem;
}

.chip-add {
  border-style: dashed;
  color: var(--brand);
  background: rgba(31, 77, 69, 0.06);
}

.list-item {
  min-height: 64px;
}

.stat .value small {
  font-size: 0.55em;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.progress {
  margin-top: 0.75rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 77, 69, 0.12);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #4f9a88);
  transition: width 0.45s ease;
}

.week-goals {
  display: grid;
  gap: 0.75rem;
}

.milestone-wins {
  margin-top: 0.85rem;
}

.milestone-wins-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.milestone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(31, 77, 69, 0.1);
  border: 1px solid rgba(31, 77, 69, 0.14);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  animation: thought-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.milestone-ico {
  font-size: 0.95rem;
  line-height: 1;
}

.week-goal {
  padding: 0.7rem 0.8rem 0.8rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.05);
  border: 1px solid rgba(31, 77, 69, 0.08);
}

.week-goal.done {
  background: rgba(47, 106, 94, 0.12);
  border-color: rgba(47, 106, 94, 0.18);
}

.week-goal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.week-goal-head strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.week-goal-head span {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.week-goal .progress {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn-compact {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand);
  color: #f7faf8;
}

.btn-primary:hover {
  background: var(--brand-soft);
}

.btn-secondary {
  background: rgba(31, 77, 69, 0.08);
  color: var(--brand);
}

.btn-ghost {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: auto;
  padding: 0.4rem 0;
}

.btn-block {
  width: 100%;
}

.btn-voice {
  background: rgba(31, 77, 69, 0.1);
  color: var(--brand);
  border: 1px solid rgba(31, 77, 69, 0.22);
  gap: 0.55rem;
}

.btn-voice.listening {
  background: var(--brand);
  color: #f7faf8;
  border-color: var(--brand);
  animation: listening 1.4s ease-in-out infinite;
}

@keyframes listening {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(31, 77, 69, 0.35);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(31, 77, 69, 0);
  }
}

.voice-status {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--brand);
  font-weight: 600;
}

.voice-status.muted {
  color: var(--muted);
  font-weight: 500;
}

.shop-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.shop-add input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.shop-item {
  cursor: pointer;
}

.shop-item.done strong {
  text-decoration: line-through;
  color: var(--muted);
}

.shop-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.shop-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.optional {
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9em;
}

.step-dots {
  display: flex;
  gap: 8px;
  margin: 0.85rem 0 1rem;
}

.step-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(31, 77, 69, 0.18);
}

.step-dots span.done {
  background: rgba(31, 77, 69, 0.45);
}

.weight-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  align-items: end;
  min-height: 96px;
  margin-top: 1rem;
  padding-top: 0.35rem;
}

.weight-col {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.weight-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--brand-soft), var(--brand));
}

.weight-bar.empty {
  background: rgba(31, 77, 69, 0.12);
}

.weight-col span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 0.35rem;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  font-size: 1.05rem;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(31, 77, 69, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 77, 69, 0.12);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.65rem;
}

.activity-group-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip-ico {
  font-size: 0.95em;
  line-height: 1;
  opacity: 0.9;
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #f7faf8;
  animation: mark-settle 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.food-mark {
  display: inline-block;
  font-style: normal;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.15em;
  line-height: 1;
  margin-right: 0.2em;
  vertical-align: -0.08em;
  animation: mark-settle 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.meal-group-head h3 .food-mark {
  font-size: 1.05em;
  margin-right: 0.3em;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--line);
}

button.list-item:active,
.list-item:has(> button:active) {
  transform: scale(0.985);
}

.list-item strong {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
}

.list-item span {
  color: var(--muted);
  font-size: 0.95rem;
}

.list-item .meta {
  text-align: right;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

button.treat-pick.active {
  background: rgba(31, 77, 69, 0.1);
  border-color: rgba(31, 77, 69, 0.35);
  box-shadow: inset 0 0 0 1px rgba(31, 77, 69, 0.12);
}

button.ai-food-lookup {
  background: rgba(196, 122, 58, 0.1);
  border-color: rgba(196, 122, 58, 0.28);
}

button.ai-food-lookup .meta {
  color: var(--accent, #c47a3a);
}

button.treat-pick.active .meta {
  color: var(--ink, #1a2e2a);
}

.meal-suggest-block {
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 16px;
  background: rgba(31, 77, 69, 0.05);
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.meal-suggest-block + .meal-suggest-block {
  margin-top: 0.75rem;
}

.meal-row {
  align-items: flex-start;
}

.meal-day {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
}

.meal-group {
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 16px;
  background: rgba(31, 77, 69, 0.05);
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.meal-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.meal-group-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.meal-group-head span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.meal-group .list {
  margin-top: 0.35rem;
}

.meal-group-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.meal-actions {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  white-space: normal;
}

.empty {
  padding: 1.1rem;
  border-radius: 16px;
  border: 1px dashed rgba(31, 77, 69, 0.28);
  color: var(--muted);
  text-align: center;
}

.empty-soft {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--brand);
  font-weight: 600;
  line-height: 1.35;
}

.coach-note {
  background:
    linear-gradient(160deg, rgba(31, 77, 69, 0.95), rgba(47, 106, 94, 0.88));
  color: #f4faf7;
  border: none;
  position: relative;
  overflow: hidden;
}

.meal-coach-note .coach-note h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.meal-coach-note .insight-block {
  margin-top: 0.9rem;
}

.weekly-checkin-due {
  background:
    linear-gradient(165deg, rgba(240, 221, 196, 0.55), rgba(255, 255, 255, 0.72)),
    var(--card);
  border-color: rgba(196, 122, 58, 0.28);
}

.coach-note.celebrate {
  box-shadow: 0 18px 42px rgba(31, 77, 69, 0.2);
}

.coach-note.celebrate::after {
  content: "✦";
  position: absolute;
  right: 18px;
  top: 13px;
  color: #f3dfab;
  font-size: 1.2rem;
  animation: twinkle 2.2s ease-in-out infinite;
}

.coach-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #f3dfab;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.coach-badge.large {
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}

.coach-listen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f7faf8;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.coach-listen::before {
  content: "▶";
  color: #f3dfab;
  font-size: 0.72rem;
}

.coach-listen.speaking::before {
  content: "●";
  animation: listening 1s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.85) rotate(-8deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(8deg);
  }
}

.coach-note p,
.coach-note .field-note {
  color: rgba(244, 250, 247, 0.9);
}

.coach-note .label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.75;
}

.insight-block {
  display: grid;
  gap: 10px;
  margin-top: 0.8rem;
}

.insight-block > div {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.insight-block strong {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.25rem;
}

.summary-ico {
  font-size: 1.05em;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
  line-height: 1;
}

.onboard-next-line {
  margin: 0.15rem 0 0;
  text-align: center;
  color: var(--brand);
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.4;
}

.wins-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(242, 229, 196, 0.52));
}

.wins-card h2 {
  margin-bottom: 0.75rem;
}

.win-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.win-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.55rem 0.72rem;
  border-radius: 999px;
  background: rgba(31, 77, 69, 0.09);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 700;
  animation: win-in 0.4s ease both;
}

.win-chip span {
  color: var(--accent);
}

.win-chip:nth-child(2) {
  animation-delay: 0.06s;
}

.win-chip:nth-child(3) {
  animation-delay: 0.12s;
}

.win-chip:nth-child(4) {
  animation-delay: 0.18s;
}

.wins-empty {
  margin: 0;
  color: var(--muted);
}

.pattern-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(220, 238, 231, 0.7));
}

.diet-plan-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(220, 238, 231, 0.75));
  border: 1px solid rgba(31, 77, 69, 0.12);
}

.diet-plan-strip {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(232, 242, 236, 0.8));
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.next-step-card {
  background:
    linear-gradient(155deg, rgba(31, 77, 69, 0.96), rgba(58, 122, 108, 0.88)),
    radial-gradient(ellipse at 90% 0%, rgba(243, 231, 201, 0.28), transparent 55%);
  color: #f7faf8;
  border: 1px solid rgba(31, 77, 69, 0.2);
  animation: soft-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.next-step-card.calm {
  background:
    linear-gradient(160deg, rgba(255, 252, 247, 0.98), rgba(232, 242, 236, 0.9));
  color: var(--ink);
  border: 1px solid rgba(31, 77, 69, 0.12);
}

.next-step-card .eyebrow {
  color: inherit;
  opacity: 0.78;
}

.next-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.next-step-ico {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.15rem;
  line-height: 1;
}

.next-step-card.calm .next-step-ico {
  background: rgba(31, 77, 69, 0.1);
}

.next-step-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 650;
  line-height: 1.3;
}

.next-step-detail {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  opacity: 0.88;
}

.next-step-card .btn-primary {
  background: #f7faf8;
  color: var(--brand);
}

.next-step-card .btn-primary:active {
  background: #eef5f1;
}

.next-step-card.calm .btn-secondary {
  border-color: rgba(31, 77, 69, 0.18);
}

.today-thought {
  background:
    linear-gradient(160deg, rgba(255, 252, 247, 0.98), rgba(232, 242, 236, 0.88)),
    radial-gradient(ellipse at 12% 0%, rgba(58, 122, 108, 0.12), transparent 55%);
  border: 1px solid rgba(31, 77, 69, 0.12);
}

.today-thought-line {
  margin: 0.35rem 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.2vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 28ch;
  animation:
    thought-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both,
    soft-breath 5.5s ease-in-out 0.7s infinite;
}

.feel-check {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(236, 244, 239, 0.9));
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.feel-check-compact h2 {
  font-family: var(--font-display);
}

.feel-check-mini {
  padding: 0.7rem 0.85rem 0.8rem;
}

.feel-mini-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.feel-mini-head .eyebrow {
  margin: 0;
}

.feel-mini-head span {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
  line-height: 1.25;
}

.feel-check-mini .feel-block {
  margin-top: 0.4rem;
}

.feel-check-mini .feel-label {
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
}

.feel-check-mini .feel-row {
  gap: 0.35rem;
}

.feel-check-mini .feel-row .chip {
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.86rem;
}

.feel-block {
  margin-top: 0.75rem;
}

.feel-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.feel-row {
  gap: 0.45rem;
}

.feel-row .chip {
  min-height: 2.55rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
}

.feel-row .chip.active {
  background: var(--ink);
  color: #f7faf8;
  border-color: var(--ink);
}

.feel-row .chip.feel-pop {
  animation: feel-pop 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feel-check.feel-complete {
  animation: feel-complete 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feel-check.feel-complete .feel-summary {
  animation: feel-summary-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  color: var(--brand);
  font-weight: 650;
}

@keyframes feel-pop {
  0% {
    transform: scale(0.92);
  }
  55% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes feel-complete {
  0% {
    transform: translateY(0);
    box-shadow: var(--shadow);
  }
  40% {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(31, 77, 69, 0.16);
  }
  100% {
    transform: translateY(0);
    box-shadow: var(--shadow);
  }
}

@keyframes feel-summary-in {
  from {
    opacity: 0.35;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.today-plan-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.45rem;
}

@media (min-width: 520px) {
  .today-plan-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.today-plan-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.today-plan-grid span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.today-pattern {
  margin: 0.85rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(31, 77, 69, 0.1);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.water-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.water-inline strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.water-inline span {
  color: var(--muted);
  font-size: 0.88rem;
}

.calm-compact .calm-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.calm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 77, 69, 0.06);
  border: 1px solid rgba(31, 77, 69, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
}

.calm-pill.done {
  background: rgba(31, 77, 69, 0.12);
  color: var(--brand);
  border-color: rgba(31, 77, 69, 0.18);
}

.photo-preview {
  position: relative;
  min-height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(58, 122, 108, 0.12), transparent 60%),
    rgba(31, 77, 69, 0.06);
  border: 1px dashed rgba(31, 77, 69, 0.2);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.photo-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 280px;
  object-fit: cover;
}

.photo-preview.empty {
  padding: 1.5rem;
}

.photo-preview-empty {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 0.5rem;
}

.photo-preview-empty strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.photo-lens {
  width: 52px;
  height: 52px;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  border: 2px solid rgba(31, 77, 69, 0.35);
  box-shadow: inset 0 0 0 8px rgba(31, 77, 69, 0.08);
  position: relative;
}

.photo-lens::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: rgba(31, 77, 69, 0.18);
}

.photo-scan-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.photo-scan-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(247, 250, 248, 0.95);
  filter: drop-shadow(0 1px 2px rgba(18, 32, 28, 0.35));
}

.photo-scan-corner.tl {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
}

.photo-scan-corner.tr {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
}

.photo-scan-corner.bl {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
}

.photo-scan-corner.br {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
}

.photo-scan-line {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(196, 122, 58, 0.15),
    rgba(247, 250, 248, 0.95),
    rgba(196, 122, 58, 0.15),
    transparent
  );
  box-shadow: 0 0 12px rgba(247, 250, 248, 0.55);
  animation: food-scan 1.6s ease-in-out infinite;
}

.photo-preview.scanning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 46, 42, 0.08),
    rgba(31, 77, 69, 0.18),
    rgba(26, 46, 42, 0.08)
  );
  z-index: 1;
  pointer-events: none;
}

@keyframes food-scan {
  0% {
    top: 12%;
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 82%;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-scan-line {
    animation: none;
    top: 48%;
    opacity: 0.85;
  }
}

.diet-plan-tagline {
  margin: 0.35rem 0 0.75rem;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}

.diet-plan-card .insight-block > div {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.diet-plan-card .insight-block strong {
  color: var(--brand);
  opacity: 1;
}

.coach-focus-grid {
  display: grid;
  gap: 0.7rem;
}

.coach-focus-card {
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(31, 77, 69, 0.06);
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.coach-focus-card .eyebrow {
  margin: 0 0 0.25rem;
}

.coach-focus-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
  line-height: 1.25;
}

.coach-focus-card span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

@media (min-width: 640px) {
  .coach-focus-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pattern-lines {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink);
  line-height: 1.45;
}

.pattern-lines li + li {
  margin-top: 0.3rem;
}

.pattern-today {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-para {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.article-detail .coach-listen,
.coach-listen.on-light {
  margin-top: 0.85rem;
  background: rgba(31, 77, 69, 0.1);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(31, 77, 69, 0.14);
}

.coach-listen.on-light::before {
  color: var(--accent);
}

.listen-item span {
  display: block;
  margin-top: 0.15rem;
}

.field-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.budget-note {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.pace-line {
  margin: 0.4rem 0 0;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.95rem;
}

.builder-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(31, 77, 69, 0.08);
}

.builder-total strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brand);
}

.builder-total span {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.meal-detail {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.calm-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(207, 231, 223, 0.6));
}

.calm-list {
  display: grid;
  gap: 8px;
  margin-top: 0.9rem;
}

.calm-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0.62rem 0.7rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.calm-row strong {
  display: block;
  font-size: 0.95rem;
}

.calm-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.calm-mark {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(31, 77, 69, 0.09);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.calm-row.done {
  background: rgba(47, 106, 94, 0.12);
}

.calm-row.done .calm-mark {
  background: var(--good);
  color: #f7faf8;
}

@keyframes win-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(5px);
  }
}

.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 10px 6px calc(10px + var(--safe-bottom));
  background: rgba(247, 243, 234, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.nav button {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 10px 2px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, background 0.22s ease, transform 0.18s ease;
}

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

.nav button.active {
  color: var(--brand);
  background: rgba(31, 77, 69, 0.1);
}

.nav button.active svg {
  animation: mark-settle 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.nav svg {
  width: 26px;
  height: 26px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 28, 0.42);
  display: grid;
  align-items: end;
  z-index: 40;
  animation: fade 0.2s ease;
}

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

.sheet {
  width: min(480px, 100%);
  margin: 0 auto;
  background: #f8f5ee;
  border-radius: 24px 24px 0 0;
  padding: 18px 18px calc(18px + var(--safe-bottom));
  max-height: 88dvh;
  overflow: auto;
  animation: sheet-up 0.28s ease;
}

@keyframes sheet-up {
  from {
    transform: translateY(24px);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.recipe-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink);
  line-height: 1.45;
}

.recipe-list li + li {
  margin-top: 0.35rem;
}

.recipe-list.numbered {
  padding-left: 1.35rem;
}

.recipe-detail h3 {
  color: var(--brand);
  font-weight: 600;
}

.recipe-row {
  align-items: center;
  gap: 12px;
}

.recipe-thumb {
  width: 64px;
  height: 64px;
  flex: none;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.08);
}

.recipe-thumb.placeholder {
  background:
    linear-gradient(145deg, rgba(31, 77, 69, 0.14), rgba(196, 122, 58, 0.18));
}

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

.food-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.3rem 0 0.2rem;
}

.food-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(31, 77, 69, 0.08);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.food-cue-ico {
  font-size: 0.85em;
  line-height: 1;
}

.coach-note .food-cue,
.next-step-card:not(.calm) .food-cue {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

.recipe-detail .food-cues {
  margin: 0 0 0.55rem;
}

.list-item .food-cues {
  margin-top: 0.25rem;
}

.recipe-hero {
  margin: -0.15rem -0.1rem 0.15rem;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(31, 77, 69, 0.08);
}

.recipe-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wellness-overview .wellness-score-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}

.wellness-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.wellness-ring {
  --wellness: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 56%, transparent 57%),
    conic-gradient(var(--brand) calc(var(--wellness) * 1%), rgba(31, 77, 69, 0.12) 0);
}

.wellness-ring strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brand);
  line-height: 1;
}

.wellness-ring-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  max-width: 6.5rem;
  line-height: 1.2;
}

.wellness-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 1rem;
}

.wellness-grid > div {
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.06);
  border: 1px solid rgba(31, 77, 69, 0.08);
}

.wellness-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
  line-height: 1.2;
}

.wellness-grid span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.cal-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0.85rem 0 0.65rem;
}

.cal-flow > div {
  text-align: center;
  padding: 0.55rem 0.2rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.06);
}

.cal-flow strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--brand);
  line-height: 1.1;
}

.cal-flow span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.week-cal-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 1rem;
  min-height: 84px;
}

.wellness-macros {
  margin-top: 0.85rem;
}

.nutrition-panel {
  padding: 0.9rem 1rem 1rem;
  border-radius: 18px;
  background: rgba(31, 77, 69, 0.06);
  border: 1px solid rgba(31, 77, 69, 0.1);
}

.nutrition-panel .eyebrow {
  margin: 0 0 0.6rem;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  text-align: center;
}

.nutrition-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.nutrition-grid strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
  line-height: 1.1;
}

.nutrition-grid span {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  background: var(--brand);
  color: #f7faf8;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 50;
  animation: rise 0.25s ease;
  max-width: calc(100% - 32px);
  text-align: center;
}

.celebration {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 50%;
  width: min(330px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 1.55rem 1.25rem 1.35rem;
  border-radius: 26px;
  color: #f7faf8;
  text-align: center;
  background: linear-gradient(155deg, #1f4d45, #34796b);
  box-shadow: 0 24px 70px rgba(16, 45, 39, 0.35);
  animation: celebrate-in 0.42s cubic-bezier(0.2, 0.85, 0.25, 1.25) both;
}

.celebration.leaving {
  animation: celebrate-out 0.4s ease both;
}

.celebration-heart {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f3dfab;
  background: rgba(255, 255, 255, 0.13);
  font-size: 1.35rem;
  animation: happy-pulse 0.7s ease 0.25s both;
}

.celebration strong {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.celebration-bump strong {
  margin-top: 0.1rem;
  font-size: clamp(1.85rem, 7vw, 2.25rem);
  letter-spacing: -0.02em;
  animation: cal-bump-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.celebration span {
  color: rgba(247, 250, 248, 0.85);
  line-height: 1.4;
}

.celebration-bump span {
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.hero-stats.cal-alive .value.big {
  animation: cal-bump-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.move-cal-flash {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.1);
  color: var(--brand);
  font-size: 0.95rem;
  line-height: 1.35;
  animation: thought-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.move-cal-flash strong {
  font-family: var(--font-display);
  font-weight: 650;
}

.move-cal-flash.leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes cal-bump-pop {
  0% {
    opacity: 0.4;
    transform: scale(0.92);
  }
  60% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.celebration-sparkles {
  position: absolute;
  inset: -35px;
  pointer-events: none;
}

.celebration-sparkles i {
  --angle: calc(var(--i) * 60deg);
  position: absolute;
  left: 50%;
  top: 50%;
  color: #e8b96a;
  font-style: normal;
  font-size: 0.75rem;
  animation: sparkle-pop 0.9s ease-out both;
  animation-delay: calc(var(--i) * 45ms);
}

@keyframes celebrate-in {
  from {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.82);
  }
}

@keyframes celebrate-out {
  to {
    opacity: 0;
    transform: translate(-50%, -54%) scale(0.94);
  }
}

@keyframes happy-pulse {
  50% {
    transform: scale(1.15);
  }
}

@keyframes sparkle-pop {
  from {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(15px) rotate(calc(var(--angle) * -1)) scale(0.4);
  }
  45% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(115px) rotate(calc(var(--angle) * -1)) scale(1);
  }
}

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

.quality {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.quality button {
  aspect-ratio: 1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--muted);
}

.quality button.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.day-dot {
  aspect-ratio: 1;
  border-radius: 12px;
  background: rgba(31, 77, 69, 0.08);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.35s ease, color 0.35s ease;
}

.day-dot.fill-1 {
  background: rgba(58, 122, 108, 0.22);
  color: var(--brand);
}

.day-dot.fill-2 {
  background: rgba(58, 122, 108, 0.4);
  color: var(--brand);
}

.day-dot.fill-3 {
  background: rgba(47, 106, 94, 0.72);
  color: #f7faf8;
}

.day-dot.fill-4,
.day-dot.filled {
  background: var(--brand);
  color: #f7faf8;
}

.profile-plan-line {
  margin: 0.15rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

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

.profile-facts > div {
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: rgba(31, 77, 69, 0.06);
  border: 1px solid rgba(31, 77, 69, 0.08);
}

.profile-facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--brand);
  line-height: 1.2;
}

.profile-facts span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
}

.dev-toggle {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dev-tools {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(31, 77, 69, 0.2);
}

.install-banner {
  margin-top: 12px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: var(--accent-soft);
  color: #6a4320;
  font-size: 0.95rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

@media (min-width: 720px) {
  #app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    min-height: 100vh;
    box-shadow: var(--shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .stack > .card,
  .today-thought-line,
  .food-coach-nudge,
  .move-cal-flash,
  .celebration-bump strong,
  .hero-stats.cal-alive .value.big,
  .food-mark,
  .win-chip,
  .chip.active,
  .nav button.active svg,
  .celebration,
  .celebration.leaving,
  .celebration-heart,
  .celebration-sparkles i,
  .coach-listen.speaking::before {
    animation: none !important;
  }

  .today-thought-line,
  .food-coach-nudge {
    opacity: 1;
  }

  .btn,
  .chip,
  .list-item,
  .nav button,
  .progress > span {
    transition: none !important;
  }
}

