:root {
  --ink: #332435;
  --muted: #7a6a7d;
  --line: #eeddf0;
  --paper: rgba(255, 250, 255, 0.9);
  --soft: #f8edf8;
  --mint: #f3e0f5;
  --leaf: #bd5fa7;
  --leaf-dark: #873c91;
  --sage: #a978b4;
  --peach: #df8f9f;
  --blue: #8467b1;
  --shadow: 0 18px 50px rgba(102, 54, 118, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 247, 255, 0.9), rgba(247, 235, 250, 0.94)),
    url("https://images.unsplash.com/photo-1515377905703-c4788e51af15?auto=format&fit=crop&w=1600&q=80") center/cover fixed;
  animation: pageBreath 14s ease-in-out infinite alternate;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone-frame {
  width: min(430px, 100%);
  height: min(860px, calc(100vh - 48px));
  min-height: min(860px, calc(100vh - 48px));
  max-height: min(860px, calc(100vh - 48px));
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: appEnter 420ms ease both;
  position: relative;
}

.phone-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.34) 46%, transparent 58%);
  transform: translateX(-120%);
  animation: glassSweep 7s ease-in-out infinite;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px 22px 6px;
  gap: 6px;
}

.brand-lockup {
  display: grid;
  justify-self: end;
}

.brand-lockup img {
  width: 142px;
  max-width: 100%;
  height: 52px;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 23px;
  line-height: 1.12;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

.ghost-button,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 12px;
}

.top-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
}

.top-actions .ghost-button {
  min-height: 30px;
  padding: 0 5px;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}

.top-actions .ghost-button:disabled {
  opacity: 0.45;
}

.icon-button {
  width: 38px;
  padding: 0;
  font-size: 24px;
}

.step-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 22px 10px;
}

.meal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 12px;
}

.meal-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  color: var(--muted);
  font-weight: 900;
}

.meal-tabs button.active {
  background: #873c91;
  color: #fff;
  border-color: #873c91;
}

.meal-kind-panel {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid rgba(168, 92, 164, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.meal-kind-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.meal-kind-title strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.meal-kind-title span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.meal-kind-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.meal-kind-filter button {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 5px 2px;
  font-size: 9.5px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(168, 92, 164, 0.08);
}

.meal-kind-filter button.active {
  background: linear-gradient(180deg, rgba(255,255,255,.98), #f4e3f6);
  color: var(--leaf-dark);
  border-color: rgba(135, 60, 145, 0.35);
}

.meal-kind-filter svg {
  width: 20px;
  height: 20px;
  stroke: #a85ca4;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meal-selection-placeholder {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  margin: 8px 0 12px;
  border: 1px dashed rgba(168, 92, 164, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  text-align: center;
}

.meal-selection-placeholder strong {
  color: var(--ink);
  font-size: 15px;
}

.meal-selection-placeholder span {
  font-size: 12px;
  font-weight: 800;
}

.favorites-gallery,
.selection-gallery {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.favorite-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
}

.favorite-card img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

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

.favorite-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-pill {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  min-height: 42px;
  font-weight: 800;
  cursor: pointer;
}

.nav-pill.active {
  background: var(--leaf-dark);
  color: #fff;
  border-color: var(--leaf-dark);
}

.screen {
  display: none;
  padding: 0 22px 86px;
  flex: 1;
  position: relative;
  min-height: 0;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 58px 10px 82px;
  opacity: 0.13;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M90 34v110'/%3E%3Cpath d='M90 61c-32 1-45 18-47 40 31 0 44-16 47-40Z'/%3E%3Cpath d='M90 84c32 1 45 18 47 40-31 0-44-16-47-40Z'/%3E%3Ccircle cx='45' cy='132' r='20'/%3E%3Cpath d='M47 112c4-14 15-22 31-22'/%3E%3Cpath d='M127 122c12-16 30-14 39 0-8 16-27 18-39 0Z'/%3E%3C/g%3E%3C/svg%3E") center bottom / 220px 220px no-repeat;
}

#quizScreen[data-step-bg="goal"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M110 31v149'/%3E%3Cpath d='M110 60c-45 2-62 25-64 54 42 0 60-22 64-54Z'/%3E%3Cpath d='M110 88c45 2 62 25 64 54-42 0-60-22-64-54Z'/%3E%3Cpath d='M110 130c-42 2-58 21-61 48 38 1 56-18 61-48Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px 300px;
}

#quizScreen[data-step-bg="gender"]::before,
#quizScreen[data-step-bg="cookMode"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M58 135c0-45 50-75 91-48 34 23 23 79-24 91-35 9-67-10-67-43Z'/%3E%3Ccircle cx='85' cy='154' r='18'/%3E%3Cpath d='M126 84c18-14 41-14 58 0'/%3E%3Cpath d='M95 101c27 8 47 28 56 56'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 310px 310px;
}

#quizScreen[data-step-bg="age"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='78' cy='132' r='34'/%3E%3Cpath d='M80 98c5-20 20-31 44-31'/%3E%3Cpath d='M127 141c-24-36 0-76 36-92 36 17 58 57 34 92h-70Z'/%3E%3Cpath d='M160 49c-6 25-18 55-33 92'/%3E%3Cpath d='M60 72c18 0 27 17 16 30-18 0-27-17-16-30Z'/%3E%3Cpath d='M52 166c28 18 75 20 111 1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 305px 305px;
}

#quizScreen[data-step-bg="servings"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M58 82h104l-13 78H71L58 82Z'/%3E%3Cpath d='M75 82c4-26 66-26 70 0'/%3E%3Cpath d='M79 115h64M84 139h54'/%3E%3Cpath d='M155 160c18-18 31-18 39 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 310px 310px;
}

#quizScreen[data-step-bg="quick"]::before,
#quizScreen[data-step-bg="summary"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M53 151c21-72 88-95 122-47-25 66-91 84-122 47Z'/%3E%3Cpath d='M71 145c32-9 59-29 83-59'/%3E%3Cpath d='M76 72c19-24 50-24 69 0'/%3E%3Cpath d='M92 72h36M101 55v17'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px 300px;
}

#quizScreen[data-step-bg="allergies"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M67 61c44-26 88 20 61 63-21 34-74 48-102 17-22-25 5-64 41-80Z'/%3E%3Cpath d='M83 90c21 8 38 28 44 53'/%3E%3Cpath d='M132 67c33 0 55 27 50 60-5 35-35 58-69 52'/%3E%3Cpath d='M165 58 54 169'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 305px 305px;
}

#quizScreen[data-step-bg="cuisine"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M48 121h124v12c0 34-27 60-62 60s-62-26-62-60v-12Z'/%3E%3Cpath d='M62 194h96'/%3E%3Cpath d='M70 96h80'/%3E%3Cpath d='M160 52 82 130M183 60 105 138'/%3E%3Cpath d='M61 59c15-20 43-18 57 1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 315px 315px;
}

#quizScreen[data-step-bg="likes"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='220' height='220' viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23a85ca4' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='80' cy='115' r='38'/%3E%3Cpath d='M83 76c4-20 18-30 41-29'/%3E%3Cpath d='M128 161c-34-46-12-90 34-115 45 25 67 69 34 115h-68Z'/%3E%3Cpath d='M162 46v115M137 89h50M126 122h73'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 310px 310px;
}

.hint-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(238, 221, 240, 0.9);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(248,237,248,.72));
}

.hint-card strong {
  font-size: 14px;
}

.hint-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: screenIn 260ms ease both;
}

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

#menuScreen {
  overflow-y: auto;
  overflow-x: hidden;
}

#menuScreen > * {
  flex: 0 0 auto;
}

.profile-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(248,237,248,.82));
  box-shadow: 0 10px 22px rgba(135, 60, 145, 0.08);
}

.profile-strip strong,
.profile-strip span {
  display: block;
}

.profile-strip strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.profile-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
}

.profile-strip button {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--leaf-dark);
  color: #fff;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}

.profile-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 28px rgba(135, 60, 145, 0.08);
}

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

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

.profile-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.profile-card.active {
  border-color: rgba(135, 60, 145, 0.38);
  background: linear-gradient(135deg, #fff7fd, #f5ecff);
}

.profile-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbf2fb, #f5edff);
  color: #a85ca4;
}

.profile-card-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.profile-card strong {
  font-size: 13px;
  font-weight: 900;
}

.profile-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.25;
}

.profile-card em {
  color: #a85ca4;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
  margin-bottom: 18px;
}

.progress-fill {
  width: 17%;
  height: 100%;
  background: linear-gradient(90deg, #bd5fa7, #8b63d4, #bd5fa7);
  background-size: 180% 100%;
  border-radius: inherit;
  transition: width 180ms ease;
  animation: softGlow 2.8s ease-in-out infinite, progressShimmer 3.8s linear infinite;
}

.quiz-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  animation: cardRise 260ms ease both;
}

.quiz-card h2:empty {
  display: none;
}

.prompt-preview,
.goal-summary {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.goal-summary {
  max-height: 178px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
}

.prompt-preview h2,
.goal-summary h2 {
  font-size: 16px;
}

.prompt-preview p:last-child,
.goal-summary p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.prompt-chips span {
  padding: 6px 8px;
  border-radius: 999px;
  background: #f6eafa;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 800;
}

.serving-picker {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7fd, #f3e8ff);
  border: 1px solid var(--line);
}

.serving-picker button {
  width: 36px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--leaf-dark);
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(135, 60, 145, 0.1);
}

.serving-picker strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  color: var(--leaf-dark);
}

.serving-picker span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.location-picker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7fd, #f3e8ff);
}

.location-picker label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.location-picker input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.location-picker input:focus {
  border-color: rgba(135, 60, 145, 0.48);
  box-shadow: 0 0 0 4px rgba(135, 60, 145, 0.08);
}

.age-wheel {
  margin-top: 16px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7fd, #f3e8ff);
  border: 1px solid var(--line);
}

.age-stepper {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 6px;
}

.age-stepper button {
  width: 38px;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--leaf-dark);
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(135, 60, 145, 0.1);
}

.age-scroll {
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.age-scroll button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-weight: 900;
  padding: 0;
  flex: 0 0 auto;
}

.age-scroll .age-3 {
  width: 24px;
  height: 28px;
  font-size: 10px;
  opacity: 0.52;
}

.age-scroll .age-2 {
  width: 28px;
  height: 34px;
  font-size: 12px;
  opacity: 0.68;
}

.age-scroll .age-1 {
  width: 34px;
  height: 40px;
  font-size: 15px;
  opacity: 0.86;
}

.age-scroll .age-0,
.age-scroll button.active {
  width: 46px;
  height: 48px;
  background: var(--leaf-dark);
  color: #fff;
  border-color: var(--leaf-dark);
  font-size: 22px;
  opacity: 1;
}

.serving-wheel {
  display: flex;
  justify-content: center;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.serving-wheel button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-weight: 900;
  padding: 0;
}

.serving-wheel .serving-3 {
  width: 26px;
  height: 28px;
  font-size: 10px;
  opacity: 0.52;
}

.serving-wheel .serving-2 {
  width: 30px;
  height: 34px;
  font-size: 12px;
  opacity: 0.68;
}

.serving-wheel .serving-1 {
  width: 36px;
  height: 40px;
  font-size: 15px;
  opacity: 0.86;
}

.serving-wheel .serving-0,
.serving-wheel button.active {
  width: 50px;
  height: 48px;
  background: var(--leaf-dark);
  color: #fff;
  border-color: var(--leaf-dark);
  font-size: 22px;
  opacity: 1;
}

.fast-picker {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7fd, #f4ecff);
}

.branch-title {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  color: var(--leaf-dark);
}

.branch-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  outline: none;
  padding: 0 13px;
}

.branch-input:focus {
  border-color: rgba(168, 92, 164, 0.7);
  box-shadow: 0 0 0 4px rgba(168, 92, 164, 0.12);
}

.branch-input::placeholder {
  color: #a68ca5;
  font-weight: 650;
}

.branch-grid {
  display: grid;
  gap: 8px;
}

.branch-grid button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  text-align: left;
  padding: 10px 12px;
}

.branch-grid button.active {
  border-color: var(--leaf-dark);
  background: #f3e3fb;
}

.branch-grid strong,
.branch-grid span {
  display: block;
}

.branch-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.branch-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.question-note,
.meal-copy,
.meal-meta,
.allergy-box p,
.modal-body p,
.modal-body li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.question-note {
  font-size: 12.5px;
  line-height: 1.3;
  margin: 4px 0 0;
}

.meal-meta {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.option-grid {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  max-height: min(380px, 43vh);
  overflow-y: auto;
  padding-right: 2px;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.option-button {
  min-height: 64px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 44px 11px 11px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.option-button:hover {
  transform: translateY(-1px);
}

.option-button.compact {
  min-height: 42px;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 6px;
  padding: 6px 31px 6px 6px;
}

.option-button.compact .option-icon {
  width: 25px;
  height: 25px;
}

.option-button.compact .option-icon svg {
  width: 18px;
  height: 18px;
}

.option-button.compact .option-title {
  font-size: 11px;
}

.option-button.compact .option-desc {
  display: none;
}

.option-button.no-allergy {
  grid-column: 1 / -1;
  min-height: 42px;
}

.option-grid:has(.option-button.compact) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.option-button.selected {
  border-color: rgba(79, 154, 111, 0.7);
  background: linear-gradient(135deg, #fff7fd, #f5ecff);
  box-shadow: 0 10px 22px rgba(135, 60, 145, 0.1);
}

.option-button:active {
  transform: scale(0.99);
}

.option-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fbf2fb, #f5edff);
  color: var(--leaf-dark);
  font-weight: 900;
}

.option-icon svg {
  width: 24px;
  height: 24px;
  stroke: #a85ca4;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.option-title {
  display: block;
  font-weight: 850;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-desc {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.checkmark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: #fff;
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}

.option-button.compact .checkmark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  right: 7px;
  font-size: 11px;
}

.option-button.selected .checkmark {
  background: var(--leaf);
  border-color: var(--leaf);
}

.bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  margin-top: 0;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(255,250,255,0), var(--paper) 34%);
}

.primary-button,
.secondary-button {
  border: 0;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-button {
  background: var(--leaf);
  color: #fff;
  box-shadow: 0 12px 24px rgba(135, 60, 145, 0.2);
}

.primary-button.full {
  width: 100%;
}

.secondary-button {
  background: var(--soft);
  color: var(--ink);
}

.secondary-button.selected-action {
  background: #f3d8ef;
  color: #873c91;
}

.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button:active,
.secondary-button:active,
.nav-pill:active,
.mini-meal:active {
  transform: scale(0.99);
}

.summary-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-band p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#menuScreen .summary-band,
#menuScreen .filter-strip {
  display: none !important;
}

.quota {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 42px;
  border-radius: 12px;
  background: #f4e1f6;
  color: var(--leaf-dark);
  font-weight: 900;
}

.filter-strip,
.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-strip {
  margin: 14px 0;
}

.filter-strip span,
.badge-row span {
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.icon-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px 7px 7px;
}

.icon-badges svg {
  width: 18px;
  height: 18px;
  stroke: #a85ca4;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meal-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  animation: cardRise 320ms ease both;
}

.meal-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  transition: transform 700ms ease;
}

.meal-card:hover img {
  transform: scale(1.025);
}

.meal-content {
  padding: 16px;
}

.meal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.calorie-badge {
  flex: 0 0 auto;
  background: #fff1dc;
  color: #8c6229;
  border-radius: 12px;
  padding: 8px 9px;
  font-weight: 900;
  font-size: 13px;
  animation: badgePulse 3.2s ease-in-out infinite;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.nutrition-donut {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 14px;
  margin: 13px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
}

.donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(
      #a85ca4 0 calc(var(--p) * 1%),
      #df8f9f calc(var(--p) * 1%) calc((var(--p) + var(--f)) * 1%),
      #8b63d4 calc((var(--p) + var(--f)) * 1%) calc((var(--p) + var(--f) + var(--c)) * 1%),
      #c9a6df calc((var(--p) + var(--f) + var(--c)) * 1%) 100%
    );
}

.donut span,
.donut small {
  display: block;
  text-align: center;
}

.donut span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.donut small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.donut-legend {
  display: grid;
  gap: 8px;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 10px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 850;
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.donut-legend b {
  text-align: right;
}

.protein { background: #a85ca4; }
.fat { background: #df8f9f; }
.carb { background: #8b63d4; }
.fiber { background: #c9a6df; }

.meal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0 10px;
}

.favorite-empty {
  margin-top: 14px;
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  background: rgba(255,255,255,.7);
  padding: 18px;
}

.favorite-empty span {
  color: var(--muted);
  font-size: 13px;
}

.portion-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg, #fff7fd, #f5ecff);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}

.portion-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.portion-stepper {
  display: grid;
  grid-template-columns: 34px 34px 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.portion-stepper button {
  height: 34px;
  border: 0;
  background: #fff;
  color: var(--leaf-dark);
  font-size: 20px;
  font-weight: 900;
}

.portion-stepper span {
  text-align: center;
  font-weight: 900;
}

.ingredients-preview {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.ingredients-preview div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ingredient-delivery {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 10px;
  border: 1px solid rgba(168, 92, 164, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(248,237,248,.76));
}

.ingredient-delivery strong,
.ingredient-delivery span,
.ingredient-delivery b {
  display: block;
}

.ingredient-delivery strong {
  font-size: 12px;
  color: var(--ink);
}

.ingredient-delivery span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.25;
}

.ingredient-delivery b {
  margin-top: 3px;
  color: var(--leaf-dark);
  font-size: 11px;
}

.ingredient-delivery a {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 9px;
  background: #873c91;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.recipe-share-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.recipe-share-actions .secondary-button {
  min-height: 46px;
}

.macro-grid div {
  background: #f6f7f4;
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  min-width: 0;
}

.macro-grid strong,
.macro-grid span {
  display: block;
}

.macro-grid strong {
  font-size: 15px;
}

.macro-grid span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.allergy-box {
  background: #f5f8fa;
  border: 1px solid #e1edf2;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0 14px;
}

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

.local-ad {
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #efd8ef;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(248,237,248,.82));
  animation: cardRise 360ms ease both;
}

.compact-ad {
  display: grid;
  grid-template-columns: 38px 1fr auto auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.partner-count {
  color: #a85ca4;
  font-size: 10px;
  font-weight: 900;
}

.ad-logo-slot {
  width: 38px;
  height: 38px;
  display: flex;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(168, 92, 164, 0.26);
  background: rgba(255, 255, 255, 0.74);
  color: #a85ca4;
  font-size: 10px;
  font-weight: 900;
  overflow: hidden;
}

.ad-logo-slot img {
  width: 92%;
  height: 92%;
  display: block;
  object-fit: contain;
}

@keyframes appEnter {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pageBreath {
  from { background-position: center, 48% 50%; }
  to { background-position: center, 52% 48%; }
}

@keyframes glassSweep {
  0%, 70% { transform: translateX(-120%); opacity: 0; }
  76% { opacity: .55; }
  92%, 100% { transform: translateX(120%); opacity: 0; }
}

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

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

@keyframes softGlow {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.25) brightness(1.04); }
}

@keyframes progressShimmer {
  from { background-position: 0% 50%; }
  to { background-position: 180% 50%; }
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(135, 60, 145, 0); }
  50% { box-shadow: 0 0 0 6px rgba(135, 60, 145, 0.08); }
}

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

.local-ad h3 {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.15;
  font-weight: 850;
}

.local-ad p:not(.section-kicker) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.partner-phone {
  color: var(--ink) !important;
  font-size: 11.5px !important;
  font-weight: 900;
}

.local-ad a {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 0 9px;
  border-radius: 10px;
  background: #873c91;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.payment-card {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid rgba(168, 92, 164, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(248,237,248,.82));
  box-shadow: 0 14px 28px rgba(135, 60, 145, 0.08);
}

.payment-card h3,
.payment-card p {
  margin: 0;
}

.payment-card h3 {
  font-size: 13.5px;
  line-height: 1.18;
}

.tariff-price {
  color: #873c91;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.tariff-limit {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.1;
}

.payment-card p,
.payment-card small {
  color: var(--muted);
  font-size: 10.8px;
  line-height: 1.25;
}

.terms-check {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 7px;
  align-items: center;
  padding: 4px 2px 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 10.8px;
  font-weight: 800;
  line-height: 1.2;
}

.terms-check input {
  width: 15px;
  height: 15px;
  accent-color: #873c91;
  margin: 0;
}

.rules-link {
  justify-self: start;
  color: #873c91;
  font-size: 10.5px;
  font-weight: 850;
  text-decoration: none;
  border-bottom: 1px solid rgba(135, 60, 145, 0.28);
}

.payment-card .primary-button:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

.partner-block a {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: #873c91;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.partner-inline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.partner-inline p {
  margin: 0;
}

.mini-meal {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  min-height: 52px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.mini-meal span {
  font-weight: 800;
}

.mini-meal b {
  color: var(--blue);
  flex: 0 0 auto;
}

.recipe-modal {
  width: min(410px, calc(100vw - 28px));
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.recipe-modal::backdrop {
  background: rgba(38, 34, 38, 0.42);
}

.support-modal {
  max-height: min(520px, 88vh);
}

.support-form {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.support-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 112px;
  outline: none;
}

.support-form textarea:focus {
  border-color: rgba(135, 60, 145, 0.48);
  box-shadow: 0 0 0 3px rgba(135, 60, 145, 0.08);
}

.support-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px;
}

.modal-body {
  padding: 0 18px 18px;
}

.recipe-hero {
  width: 100%;
  height: 178px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  margin: 0 0 12px;
  box-shadow: 0 16px 28px rgba(70, 48, 76, 0.14);
}

.modal-body ol {
  padding-left: 20px;
}

.modal-body .recipe-steps {
  display: grid;
  gap: 8px;
  padding-left: 0;
  margin: 0;
  list-style: none;
  counter-reset: recipe-step;
}

.recipe-steps li {
  counter-increment: recipe-step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-radius: 11px;
  background: #fbf3fb;
  border: 1px solid rgba(168, 92, 164, 0.14);
}

.recipe-steps li::before {
  content: counter(recipe-step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #873c91;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.recipe-steps strong,
.recipe-steps span {
  display: block;
  grid-column: 2;
}

.recipe-steps strong {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.15;
}

.recipe-steps span {
  margin-top: -2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.recipe-stats span {
  min-height: 54px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 12px;
  background: #f8edf8;
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.recipe-stats svg,
.recipe-block h3 svg {
  width: 18px;
  height: 18px;
  stroke: #a85ca4;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recipe-block h3 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.recipe-block {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.recipe-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.recipe-nutrition-card .macro-grid {
  margin: 8px 0 10px;
}

.recipe-nutrition-card .nutrition-donut {
  margin: 0;
  background: #fff8ff;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
    place-items: stretch;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}
