﻿:root {
  --green: #0aa06f;
  --green-dark: #07845e;
  --green-soft: #dff6ed;
  --ink: #202020;
  --muted: #777777;
  --light: #f6f6f4;
  --card: #ffffff;
  --line: #ececea;
  --gold: #f1b84b;
  --blue: #2d83a5;
  --shadow: 0 18px 42px rgba(24, 33, 28, 0.1);
  --shadow-strong: 0 22px 54px rgba(10, 160, 111, 0.22);
}

* {
  box-sizing: border-box;
}

* {
  overflow-wrap: anywhere;
}

html {
  min-height: 100%;
  background: var(--light);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--light);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.language-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--light);
}

.language-gate.hidden {
  display: none;
}

.language-card {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.language-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.language-brand > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  font-weight: 950;
}

.language-brand strong,
.language-brand small {
  display: block;
}

.language-brand small {
  color: var(--muted);
  font-weight: 800;
}

.language-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.language-card h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.05;
}

.language-grid {
  display: grid;
  gap: 12px;
}

.language-grid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.04);
}

.language-grid button:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.language-grid strong,
.language-grid span {
  display: block;
}

.language-grid span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.app-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.phone-app {
  padding: 42px 28px 122px;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.app-header > div {
  min-width: 0;
}

.app-header h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 3.55rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.app-header p {
  margin: 10px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.25rem, 3.7vw, 2.05rem);
  line-height: 1.32;
}

.app-header .hello {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 48px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  background: #fff;
  color: #5f5f5f;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: var(--shadow);
}

.search {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

.search input,
select,
.progress-panel input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 0 20px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: 0 8px 22px rgba(30, 30, 30, 0.04);
}

.search input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(10, 160, 111, 0.12);
}

.view-stack,
.view {
  display: grid;
  gap: 22px;
}

.goal-card {
  border-radius: 34px;
  padding: clamp(28px, 7vw, 56px);
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-strong);
}

.goal-card > span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 800;
}

.goal-card strong {
  display: block;
  margin-top: 16px;
  font-size: clamp(4rem, 15vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.progress-number {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-number small {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.15rem, 4vw, 2rem);
  font-weight: 800;
}

.goal-card p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.55;
}

.progress-track {
  height: 16px;
  margin: 26px 0 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
}

.progress-track span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.goal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary,
.secondary,
.tiny-button,
.dialog-close {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary {
  background: #fff;
  color: var(--green-dark);
}

.secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.summary-card,
.card,
.recipe-card,
.notice,
.empty-state,
.progress-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.progress-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.panel-heading {
  display: grid;
  gap: 4px;
}

.panel-heading span {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.panel-heading strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.child-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.height-field {
  display: grid;
  gap: 8px;
}

.height-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.height-inputs {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 10px;
}

.height-inputs label {
  position: relative;
  display: block;
}

.height-inputs input {
  padding-right: 48px;
}

.height-inputs small {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 950;
}

.ideal-weight-card {
  grid-column: 1 / -1;
  min-height: 96px;
  border-radius: 22px;
  padding: 18px 20px;
  background: var(--green-soft);
}

.ideal-weight-card span {
  display: block;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ideal-weight-card strong {
  display: block;
  margin-top: 8px;
  color: var(--green-dark);
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1;
}

.progress-inputs,
.week-grid {
  display: grid;
  gap: 14px;
}

.progress-inputs {
  grid-template-columns: 1fr;
}

.week-grid {
  grid-template-columns: repeat(4, 1fr);
}

.progress-panel label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.progress-panel label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.progress-panel input {
  min-height: 54px;
  border-radius: 18px;
  font-weight: 900;
}

.progress-panel select {
  min-height: 54px;
  border-radius: 18px;
  font-weight: 900;
}

.summary-card {
  min-height: 180px;
  padding: 26px;
}

.summary-icon {
  float: right;
  color: #c9c9c9;
  font-size: 1.8rem;
}

.summary-card small,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 18px;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
}

.summary-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.notice {
  padding: 22px 24px;
  border-left: 6px solid var(--blue);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
}

.notice p {
  margin: 0;
  color: #45606b;
  line-height: 1.5;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.86rem;
  box-shadow: 0 10px 24px rgba(14, 151, 108, 0.12);
}

.plan-badge span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1;
}

.eyebrow {
  margin: 0;
  color: var(--green);
}

.protocol-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.protocol-toggle button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.protocol-toggle button.active {
  background: var(--green);
  color: #fff;
}

.grid {
  display: grid;
  gap: 18px;
}

.protocol-profile {
  display: none;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: var(--green-soft);
  color: var(--green-dark);
  box-shadow: var(--shadow);
}

.protocol-profile.visible {
  display: block;
}

.protocol-profile strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.protocol-profile p {
  margin: 0;
  line-height: 1.5;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.recipe-grid {
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
}

.card,
.recipe-card {
  padding: 24px;
}

.card h3,
.recipe-card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

.card h3 {
  font-size: 1.55rem;
}

.meal-list,
.ingredient-list,
.prep-list {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.meal-list li + li {
  margin-top: 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

.recipe-meta {
  color: var(--muted);
  line-height: 1.5;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}

.tiny-button {
  min-height: 42px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.tiny-button.favorite {
  background: #fff0d2;
  color: #80540d;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  width: min(100%, 1120px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 10px max(10px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
  border-top: 1px solid rgba(226, 226, 222, 0.82);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -16px 34px rgba(32, 32, 32, 0.08);
  backdrop-filter: blur(16px);
}

.nav-tab {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 66px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #8e8e8e;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.nav-tab span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  font-size: 1.65rem;
  line-height: 1;
}

.nav-tab.active {
  color: var(--green);
}

.hidden {
  display: none !important;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  grid-column: 1 / -1;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 28px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.38);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  padding: 0;
  background: #f1f1ef;
  color: var(--ink);
}

.dialog-body {
  padding: 34px;
}

.dialog-body h2 {
  margin: 0 0 12px;
}

.safety-note {
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: #fff4d8;
  color: #684b12;
  line-height: 1.45;
}

@media (min-width: 900px) {
  .app-shell {
    max-width: 1180px;
  }

  .phone-app {
    padding-left: 34px;
    padding-right: 34px;
  }
}

@media (max-width: 760px) {
  .phone-app {
    padding: 34px 24px 116px;
  }

  .summary-grid,
  .cards,
  .recipe-grid,
  .child-metrics,
  .progress-inputs,
  .week-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .goal-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary,
  .secondary,
  .tiny-button {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .phone-app {
    padding: 28px 18px 112px;
  }

  .app-header {
    gap: 12px;
  }

  .app-header h1 {
    font-size: clamp(1.82rem, 9vw, 2.8rem);
  }

  .app-header p {
    font-size: clamp(1.18rem, 7vw, 1.7rem);
  }

  .goal-card {
    border-radius: 30px;
    padding: 30px 24px;
  }

  .summary-card,
  .card,
  .recipe-card,
  .notice {
    border-radius: 24px;
  }

  .bottom-nav {
    padding-left: 6px;
    padding-right: 6px;
  }

  .nav-tab {
    min-height: 62px;
    border-radius: 14px;
    font-size: 0.7rem;
  }

  .nav-icon {
    font-size: 1.45rem;
  }
}

@media (max-width: 370px) {
  .phone-app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .nav-tab {
    font-size: 0.65rem;
  }
}
