:root {
  color-scheme: light;
  --leaf: #2f6f4f;
  --leaf-dark: #1d4c37;
  --leaf-soft: #e7f1df;
  --cream: #f7f1e6;
  --paper: #fffaf1;
  --card: #ffffff;
  --warm: #ff6848;
  --warm-dark: #d64f35;
  --gold: #f5c86a;
  --ink: #1f271f;
  --muted: #757b70;
  --line: #ece6dc;
  --shadow: 0 18px 42px rgba(49, 55, 46, 0.12);
  --strong-shadow: 0 28px 80px rgba(49, 55, 46, 0.22);
  --glow: 0 18px 38px rgba(255, 104, 72, 0.22);
  --radius: 8px;
  --bottom-space: calc(90px + env(safe-area-inset-bottom, 0px));
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #f6f6f3;
}

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

button {
  border: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.page-stage {
  display: grid;
  min-height: 100svh;
  place-items: stretch center;
}

.mobile-app {
  position: relative;
  width: min(100%, 460px);
  min-height: 100svh;
  overflow: hidden;
  background: #ffffff;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(145deg, var(--leaf), var(--warm));
  box-shadow: 0 12px 24px rgba(47, 111, 79, 0.22);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.icon-button {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(49, 55, 46, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.membership-badge {
  border-radius: 999px;
  padding: 7px 10px;
  color: #ffffff;
  background: var(--leaf);
  box-shadow: 0 8px 18px rgba(47, 111, 79, 0.18);
  font-size: 0.7rem;
  font-weight: 950;
}

.screen-stack {
  position: relative;
}

.access-gate {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 14px;
  min-height: calc(100svh - 70px);
  padding: 18px 18px var(--bottom-space);
  align-content: end;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.52) 43%,
      rgba(255, 250, 241, 0.94) 100%
    ),
    url("assets/auth-healthy-eating.jpg");
  background-position: 50% 16%;
  background-size: cover;
}

.access-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.access-panel h1 {
  margin-bottom: 2px;
  font-size: 2.1rem;
}

.access-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid rgba(236, 230, 220, 0.95);
  border-radius: 8px;
  padding: 4px;
  background: rgba(247, 241, 230, 0.7);
}

.auth-tabs button {
  min-height: 40px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 950;
}

.auth-tabs button.is-active {
  color: #ffffff;
  background: var(--leaf);
  box-shadow: 0 8px 18px rgba(47, 111, 79, 0.16);
}

.auth-form,
.checkout-form {
  display: grid;
  gap: 12px;
}

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

.price-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  border: 1px solid rgba(236, 230, 220, 0.95);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
}

.price-card:has(input:checked) {
  border-color: rgba(47, 111, 79, 0.5);
  box-shadow: 0 12px 26px rgba(47, 111, 79, 0.12);
}

.price-card input,
.terms-check input {
  accent-color: var(--leaf);
}

.price-card strong,
.price-card small {
  display: block;
}

.price-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.paypal-checkout {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(236, 230, 220, 0.95);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 250, 241, 0.78);
}

.paypal-config-alert {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.35;
}

.paypal-button-container {
  min-height: 44px;
}

.demo-payment {
  border: 1px dashed rgba(117, 123, 112, 0.42);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.demo-payment summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 950;
}

.demo-payment[open] {
  display: grid;
  gap: 12px;
}

.hotmart-panel {
  border-color: rgba(255, 104, 72, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 238, 0.86)),
    #ffffff;
}

.terms-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.app-screen {
  min-height: calc(100svh - 70px);
  padding: 12px 18px var(--bottom-space);
}

.app-screen.is-active {
  animation: screenIn 180ms ease both;
}

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

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

h1 {
  margin-block-end: 10px;
  font-size: clamp(2rem, 10vw, 2.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-block-end: 8px;
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-block-end: 8px;
  font-size: 1rem;
  line-height: 1.18;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--warm);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero,
.screen-heading,
.home-block,
.checkin-panel {
  margin-bottom: 18px;
}

.home-hero {
  display: grid;
  min-height: 204px;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 35%);
  gap: 14px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(236, 230, 220, 0.92);
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.94)),
    #ffffff;
  box-shadow: 0 18px 42px rgba(49, 55, 46, 0.1);
}

.home-hero-copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 6px;
}

.home-hero-copy .time-pill {
  width: max-content;
  margin-bottom: 4px;
  background: var(--warm);
}

.home-hero-copy .eyebrow,
.home-hero-copy h1,
.home-hero-copy p {
  margin: 0;
}

.home-hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(1.85rem, 10vw, 2.7rem);
  line-height: 0.94;
}

.home-hero-copy p:not(.eyebrow) {
  max-width: 26ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.home-hero-image {
  width: 100%;
  height: 100%;
  min-height: 172px;
  border-radius: 18px;
  object-fit: cover;
  object-position: 50% 50%;
  box-shadow: 0 16px 34px rgba(49, 55, 46, 0.16);
}

.home-greeting {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.home-greeting p,
.screen-heading p:not(.eyebrow),
.promo-card p,
.empty-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.hero-line {
  display: inline-flex;
  margin-top: 2px;
  color: var(--warm);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.28;
}

.time-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.search-card {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  border-radius: 18px;
  padding: 10px 14px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(49, 55, 46, 0.08);
  cursor: pointer;
  text-align: left;
}

.search-card::after {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--warm);
  content: "⌕";
  font-size: 1.1rem;
  font-weight: 900;
}

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

.search-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.search-card strong {
  margin-top: 2px;
  font-size: 0.96rem;
}

.promo-card {
  position: relative;
  display: grid;
  min-height: 176px;
  grid-template-columns: 1fr 135px;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 22px;
  padding: 18px 0 18px 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(31, 76, 55, 0.98), rgba(67, 133, 85, 0.94)),
    var(--leaf);
  box-shadow: 0 20px 46px rgba(47, 111, 79, 0.24);
}

.promo-card .eyebrow,
.promo-card p {
  color: rgba(255, 255, 255, 0.86);
}

.promo-card h2 {
  max-width: 11ch;
  margin-bottom: 8px;
  font-size: 1.7rem;
}

.promo-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  transform: translateX(24px);
  box-shadow: -14px 14px 34px rgba(21, 49, 35, 0.26);
}

.promise-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 233, 0.9)),
    #ffffff;
  box-shadow: 0 16px 36px rgba(49, 55, 46, 0.1);
}

.promise-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--warm), var(--warm-dark));
  box-shadow: var(--glow);
  font-weight: 950;
}

.promise-card h2 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.promise-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.promise-card li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.28;
}

.promise-card li::before {
  position: absolute;
  left: 0;
  color: var(--warm);
  content: "•";
  font-weight: 950;
}

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

.block-title-row h2 {
  margin-bottom: 0;
}

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

.state-button {
  position: relative;
  display: grid;
  min-height: 128px;
  align-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 20px;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(49, 55, 46, 0.08);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.state-button:hover,
.state-button:focus-visible,
.state-button.is-selected {
  border-color: rgba(255, 104, 72, 0.42);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.state-button.is-selected {
  background: #ffffff;
}

.state-button::after {
  content: none;
}

.state-chip {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--warm);
}

.state-icon {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(56%) sepia(86%) saturate(2997%) hue-rotate(333deg) brightness(101%) contrast(101%);
}

.state-icon-fallback {
  display: grid;
  place-items: center;
  color: var(--warm);
  font-size: 2rem;
  font-weight: 950;
  filter: none;
}

.state-button strong,
.state-button span {
  position: relative;
  z-index: 1;
}

.state-button strong {
  font-size: 0.98rem;
  line-height: 1.05;
}

.state-description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.28;
}

.home-plan-preview,
.empty-panel,
.photo-resolver,
.ingredient-finder,
.shopping-list,
.weekly-pulse,
.checkin-panel {
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(49, 55, 46, 0.08);
}

.home-plan-preview,
.empty-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.preview-row {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 12px;
  align-items: center;
}

.preview-row img {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  object-fit: cover;
}

.preview-row strong,
.preview-row span {
  display: block;
}

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

.screen-heading {
  padding-top: 4px;
}

.screen-heading p:not(.eyebrow) {
  max-width: 34ch;
}

.plan-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.plan-focus-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 238, 0.94)),
    #ffffff;
  box-shadow: 0 14px 32px rgba(49, 55, 46, 0.09);
}

.summary-label,
.plan-time-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--warm);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.plan-focus-card strong {
  display: block;
  max-width: 12ch;
  margin-bottom: 8px;
  color: var(--leaf-dark);
  font-size: clamp(1.55rem, 7vw, 2.05rem);
  line-height: 0.98;
}

.plan-focus-card div > span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.plan-time-card {
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(231, 241, 223, 0.72);
}

.plan-time-card strong {
  max-width: none;
  margin-bottom: 6px;
  font-size: clamp(1.7rem, 8vw, 2.25rem);
}

.plan-time-card small {
  display: block;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.32;
}

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

.summary-tile,
.metric-card {
  min-height: 94px;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 241, 0.9)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(49, 55, 46, 0.08);
}

.summary-tile strong,
.metric-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--leaf-dark);
  font-size: 1.35rem;
  line-height: 1;
}

.summary-tile span,
.metric-card span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.28;
}

.meal-grid,
.result-grid,
.metrics-grid {
  display: grid;
  gap: 18px;
}

.meal-card,
.result-card {
  position: relative;
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid rgba(236, 230, 220, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px rgba(49, 55, 46, 0.11);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.meal-card::before,
.result-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--leaf);
}

.meal-card:nth-child(2n)::before,
.result-card:nth-child(2n)::before {
  background: var(--warm);
}

.meal-card:nth-child(3n)::before,
.result-card:nth-child(3n)::before {
  background: var(--gold);
}

.meal-card:hover,
.result-card:hover {
  box-shadow: 0 22px 46px rgba(49, 55, 46, 0.16);
  transform: translateY(-1px);
}

.meal-card img,
.result-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 154px;
  align-self: stretch;
  justify-self: stretch;
  object-fit: cover;
  background: var(--leaf-soft);
}

.meal-card-body,
.result-card-body {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 14px 14px 14px 16px;
}

.meal-type,
.match-note {
  color: var(--warm);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-grid;
  min-height: 26px;
  place-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--leaf-dark);
  background: var(--leaf-soft);
  font-size: 0.74rem;
  font-weight: 900;
}

.recommendation-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--warm-dark);
  background: rgba(255, 104, 72, 0.11);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meal-benefit,
.result-card p {
  margin: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(247, 241, 230, 0.55);
  font-size: 0.82rem;
  line-height: 1.32;
}

.source-line {
  margin: 0;
  border-top: 1px solid rgba(236, 230, 220, 0.9);
  padding-top: 8px;
  color: var(--leaf-dark);
  font-size: 0.76rem;
  line-height: 1.35;
}

.source-line a {
  color: inherit;
  font-weight: 800;
}

.card-actions,
.shopping-actions,
.dialog-actions,
.sticky-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sticky-actions {
  position: sticky;
  bottom: 88px;
  z-index: 10;
  margin-top: 16px;
  border-radius: 20px;
  padding: 10px;
  background: rgba(255, 250, 241, 0.88);
  backdrop-filter: blur(14px);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 950;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(145deg, var(--warm), var(--warm-dark));
  box-shadow: 0 14px 28px rgba(255, 104, 72, 0.28);
}

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

.secondary-button.is-success {
  color: #ffffff;
  border-color: var(--leaf);
  background: linear-gradient(145deg, var(--leaf), var(--leaf-dark));
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.card-actions .primary-button,
.card-actions .secondary-button,
.shopping-actions .primary-button,
.shopping-actions .secondary-button,
.sticky-actions .primary-button,
.sticky-actions .secondary-button {
  flex: 1 1 110px;
}

.ingredient-finder,
.checkin-form {
  display: grid;
  gap: 14px;
}

.photo-resolver,
.ingredient-finder,
.checkin-panel {
  padding: 16px;
}

.photo-resolver {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.photo-resolver-copy h2 {
  margin-bottom: 6px;
  font-size: 1.24rem;
  line-height: 1.08;
}

.photo-resolver-copy p:not(.eyebrow),
.photo-ingredient-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.36;
}

.photo-upload-button {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--warm), var(--warm-dark));
  box-shadow: 0 14px 28px rgba(255, 104, 72, 0.22);
  cursor: pointer;
}

.photo-upload-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload-button span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.2);
}

.photo-upload-button strong {
  font-size: 0.94rem;
}

.photo-preview {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.photo-preview[hidden],
.photo-ingredient-panel[hidden] {
  display: none;
}

.photo-preview img {
  width: 92px;
  height: 92px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(49, 55, 46, 0.14);
}

.photo-ingredient-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(236, 230, 220, 0.9);
  padding-top: 12px;
}

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

.photo-chip-grid button {
  min-height: 36px;
  border: 1px solid rgba(236, 230, 220, 0.95);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--leaf-dark);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(49, 55, 46, 0.06);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.photo-chip-grid button.is-selected {
  color: #ffffff;
  border-color: transparent;
  background: var(--leaf);
}

.quick-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}

.quick-examples button {
  min-height: 36px;
  border: 1px solid rgba(236, 230, 220, 0.95);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(49, 55, 46, 0.06);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.quick-examples button:hover,
.quick-examples button:focus-visible {
  color: #ffffff;
  background: var(--leaf);
}

label,
legend {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 104, 72, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 104, 72, 0.12);
}

.shopping-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.shopping-actions .primary-button {
  grid-column: span 2;
}

.shopping-list {
  padding: 8px 16px;
}

.shopping-list ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shopping-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(236, 230, 220, 0.88);
}

.shopping-item:last-child {
  border-bottom: 0;
}

.shopping-item input {
  width: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  accent-color: var(--warm);
}

.shopping-item strong {
  display: block;
  line-height: 1.2;
}

.shopping-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.empty-state,
.status-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.empty-state {
  padding: 16px 0;
}

.status-line {
  min-height: 22px;
  margin-top: 10px;
  font-weight: 900;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

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

.segmented label {
  position: relative;
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 8px;
  color: var(--muted);
  background: #ffffff;
  cursor: pointer;
  text-align: center;
}

.segmented input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented label:has(input:checked) {
  color: #ffffff;
  border-color: var(--warm);
  background: var(--warm);
}

.habit-checks,
.meal-status-grid {
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

.habit-checks label {
  display: grid;
  min-height: 46px;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.habit-checks input {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--warm);
}

.meal-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meal-status-grid label {
  min-width: 0;
}

.weekly-pulse {
  display: grid;
  gap: 13px;
  margin-bottom: 14px;
  padding: 16px;
}

.weekly-insight,
.body-map-card,
.patterns-card,
.monthly-map-insight {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  border-radius: 22px;
  padding: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 104, 72, 0.96), rgba(214, 79, 53, 0.96)),
    var(--warm);
  box-shadow: var(--glow);
}

.body-map-card {
  background:
    linear-gradient(135deg, rgba(47, 111, 79, 0.98), rgba(29, 76, 55, 0.94)),
    var(--leaf);
  box-shadow: 0 18px 40px rgba(47, 111, 79, 0.2);
}

.patterns-card {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 241, 0.9)),
    #ffffff;
  box-shadow: 0 16px 38px rgba(49, 55, 46, 0.1);
}

.monthly-map-insight {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(47, 111, 79, 0.98), rgba(255, 104, 72, 0.9)),
    var(--leaf);
  box-shadow: 0 18px 40px rgba(47, 111, 79, 0.18);
}

.weekly-insight .insight-kicker,
.body-map-card .insight-kicker,
.patterns-card .insight-kicker,
.monthly-map-insight .insight-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patterns-card .insight-kicker {
  color: var(--warm);
}

.weekly-insight strong,
.body-map-card strong,
.patterns-card strong,
.monthly-map-insight strong {
  font-size: 1.35rem;
  line-height: 1.05;
}

.weekly-insight p,
.body-map-card p,
.patterns-card p,
.monthly-map-insight p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.38;
}

.patterns-card p {
  color: var(--muted);
}

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

.patterns-list li {
  border: 1px solid rgba(236, 230, 220, 0.88);
  border-radius: 16px;
  padding: 11px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  line-height: 1.36;
}

.pulse-row {
  display: grid;
  grid-template-columns: 90px 1fr 46px;
  gap: 10px;
  align-items: center;
}

.pulse-row strong,
.pulse-row span:last-child {
  font-size: 0.82rem;
}

.pulse-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--leaf-soft);
}

.pulse-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--warm));
}

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

.metric-card {
  display: grid;
  align-content: center;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.calendar-card,
.day-detail-card {
  border: 1px solid rgba(236, 230, 220, 0.92);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 241, 0.9)),
    #ffffff;
  box-shadow: 0 16px 38px rgba(49, 55, 46, 0.11);
}

.calendar-card {
  margin-bottom: 16px;
  padding: 16px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-toolbar h2 {
  margin-bottom: 0;
}

.calendar-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(49, 55, 46, 0.07);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 950;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 950;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.calendar-day:hover,
.calendar-day:focus-visible,
.calendar-day.is-selected {
  border-color: rgba(255, 104, 72, 0.45);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.calendar-day.is-outside {
  color: rgba(117, 123, 112, 0.42);
  background: rgba(255, 255, 255, 0.42);
}

.calendar-day::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
}

.calendar-day[data-status="complete"]::after {
  background: #3f9a68;
}

.calendar-day[data-status="partial"]::after {
  background: #f1bf4f;
}

.calendar-day[data-status="empty"]::after {
  background: #d8d2c7;
}

.calendar-day[data-status="alert"]::after {
  background: #d86b61;
}

.calendar-day[data-status="complete"] {
  background: linear-gradient(145deg, rgba(231, 246, 235, 0.98), rgba(255, 255, 255, 0.92));
}

.calendar-day[data-status="partial"] {
  background: linear-gradient(145deg, rgba(255, 247, 219, 0.98), rgba(255, 255, 255, 0.92));
}

.calendar-day[data-status="alert"] {
  background: linear-gradient(145deg, rgba(255, 232, 229, 0.98), rgba(255, 255, 255, 0.92));
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-complete {
  background: #3f9a68;
}

.status-partial {
  background: #f1bf4f;
}

.status-empty {
  background: #d8d2c7;
}

.status-alert {
  background: #d86b61;
}

.day-detail-card {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.day-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.day-detail-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.36;
}

.day-status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
}

.day-status-pill.complete {
  background: #3f9a68;
}

.day-status-pill.partial {
  background: #d99b27;
}

.day-status-pill.empty {
  color: var(--muted);
  background: #ece6dc;
}

.day-status-pill.alert {
  background: #d86b61;
}

.day-meal-list,
.day-feeling-grid,
.ritual-checks {
  display: grid;
  gap: 9px;
}

.day-meal-item,
.feeling-item,
.ritual-checks label {
  border: 1px solid rgba(236, 230, 220, 0.88);
  border-radius: 16px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.76);
}

.day-meal-item strong,
.feeling-item strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.84rem;
}

.day-meal-item span,
.feeling-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.ritual-card {
  display: grid;
  gap: 10px;
  border-radius: 20px;
  padding: 15px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(47, 111, 79, 0.98), rgba(255, 104, 72, 0.88)),
    var(--leaf);
  box-shadow: 0 18px 40px rgba(47, 111, 79, 0.2);
}

.ritual-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.36;
}

.ritual-card strong {
  font-size: 1.2rem;
  line-height: 1.12;
}

.ritual-checks label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  font-weight: 900;
}

.ritual-checks input {
  width: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: var(--warm);
}

.profile-dialog,
.recipe-dialog {
  width: min(430px, calc(100% - 22px));
  max-height: min(90svh, 900px);
  border: 0;
  border-radius: 26px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--strong-shadow);
}

.profile-dialog::backdrop,
.recipe-dialog::backdrop {
  background: rgba(31, 39, 31, 0.42);
  backdrop-filter: blur(8px);
}

.profile-form,
.recipe-dialog article,
.recipe-dialog .dialog-actions {
  padding: 20px;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.dialog-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

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

.account-summary {
  display: grid;
  gap: 10px;
}

.account-summary div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.account-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.account-summary strong {
  color: var(--leaf-dark);
  font-size: 0.85rem;
  text-align: right;
}

.recipe-hero {
  display: grid;
  gap: 16px;
}

.recipe-hero img {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 22px;
  object-fit: cover;
}

.recipe-columns {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.recipe-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.recipe-columns ul,
.recipe-columns ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  width: min(448px, calc(100% - 24px));
  margin: 0 auto;
  border: 1px solid rgba(236, 230, 220, 0.9);
  border-radius: 24px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(49, 55, 46, 0.2);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  place-items: center;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 950;
  text-align: center;
}

.bottom-nav button span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav button.is-active {
  color: #ffffff;
  background: var(--warm);
  box-shadow: 0 10px 22px rgba(255, 104, 72, 0.26);
}

.nav-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.95;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottom-space) + 8px);
  left: 18px;
  z-index: 60;
  width: min(424px, calc(100% - 36px));
  margin: 0 auto;
  border: 1px solid rgba(236, 230, 220, 0.94);
  border-radius: 18px;
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  font-weight: 900;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 520px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 32%);
    gap: 12px;
    padding: 15px;
  }

  .home-hero-copy h1 {
    font-size: clamp(1.7rem, 9vw, 2.25rem);
  }

  .home-hero-copy p:not(.eyebrow) {
    font-size: 0.86rem;
  }

  .home-hero-image {
    min-height: 162px;
    border-radius: 16px;
  }

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

  .state-button {
    min-height: 96px;
    grid-template-columns: 52px 1fr;
    column-gap: 14px;
    align-content: center;
    align-items: center;
    padding: 16px;
  }

  .state-chip {
    grid-row: 1 / span 2;
  }

  .state-button strong {
    align-self: end;
    font-size: 1.02rem;
  }

  .state-description {
    align-self: start;
  }

  .plan-focus-card {
    padding: 16px;
  }

  .plan-support-grid {
    grid-template-columns: 1fr;
  }

  .summary-tile,
  .metric-card {
    min-height: auto;
    padding: 15px;
  }

  .summary-tile strong,
  .metric-card strong {
    font-size: 1.22rem;
    line-height: 1.08;
  }

  .meal-grid,
  .result-grid {
    gap: 20px;
  }

  .photo-preview {
    grid-template-columns: 78px 1fr;
  }

  .photo-preview img {
    width: 78px;
    height: 78px;
  }

  .meal-card,
  .result-card {
    grid-template-columns: 112px 1fr;
    gap: 0;
    align-items: stretch;
    min-height: 164px;
    border-radius: 18px;
    padding: 0;
  }

  .meal-card::before,
  .result-card::before {
    inset: 0 auto 0 0;
    width: 5px;
    height: auto;
  }

  .meal-card img,
  .result-card img {
    width: 100%;
    height: 100%;
    min-height: 164px;
    aspect-ratio: auto;
  }

  .meal-card-body,
  .result-card-body {
    align-content: start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
  }

  .meal-card h3,
  .result-card h3 {
    font-size: 1.16rem;
    line-height: 1.22;
  }

  .meal-card .recommendation-badge {
    display: none;
  }

  .meal-card .source-line,
  .result-card .source-line {
    display: none;
  }

  .card-actions .primary-button,
  .card-actions .secondary-button {
    min-height: 44px;
    padding-inline: 10px;
    flex-basis: 96px;
  }
}

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

  .mobile-app {
    min-height: calc(100svh - 56px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 34px;
    box-shadow: var(--strong-shadow);
  }

  .app-topbar {
    border-radius: 34px 34px 0 0;
  }

  .bottom-nav {
    bottom: 30px;
  }
}

@media (max-width: 374px) {
  .app-screen {
    padding-inline: 14px;
  }

  .promo-card {
    grid-template-columns: 1fr 112px;
  }

  .promo-card img {
    width: 126px;
    height: 126px;
  }

  .bottom-nav button {
    font-size: 0.56rem;
  }
}

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

@media print {
  body {
    background: #ffffff;
  }

  body * {
    visibility: hidden;
  }

  #shoppingPrintArea,
  #shoppingPrintArea * {
    visibility: visible;
  }

  #shoppingPrintArea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
}
