: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;
  --macro-protein: #873c91;
  --macro-fat: #d64f8f;
  --macro-carb: #3f7fc7;
  --macro-fiber: #2f9b82;
  --macro-calorie: #f0a000;
  --shadow: 0 18px 50px rgba(102, 54, 118, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(196, 92, 168, 0.18), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(135, 60, 145, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 247, 255, 0.96), rgba(247, 235, 250, 0.98));
  animation: pageBreath 14s ease-in-out infinite alternate;
}

body.auth-pending .app-shell {
  display: none;
}

body.auth-booting .auth-lock {
  display: none;
}

.auth-lock {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 24px;
}

body.auth-pending .auth-lock {
  display: grid;
}

body.auth-ready .auth-lock {
  display: none;
}

.auth-lock > div {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 28px 22px;
  border: 1px solid rgba(238, 221, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 250, 255, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-lock img {
  width: 126px;
  height: auto;
  display: block;
}

.auth-lock h1 {
  margin: 2px 0 0;
  color: var(--leaf-dark);
  font-size: 23px;
  line-height: 1.15;
}

.auth-lock.hide-open-action .primary-button,
.auth-lock.hide-open-action .auth-provider-menu,
.auth-lock.hide-open-action .auth-provider-hint {
  display: none;
}

.auth-lock p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.auth-site-link {
  width: 100%;
  min-height: 46px;
}

.auth-login-toggle {
  cursor: pointer;
}

.auth-provider-menu {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-provider-menu[hidden] {
  display: none;
}

.auth-provider-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(189, 95, 167, 0.24);
  border-radius: 16px;
  background: #fff;
  color: var(--leaf-dark);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(135, 60, 145, 0.1);
  cursor: pointer;
}

.auth-provider-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.auth-provider-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #873c91, #d64f8f);
  color: #fff;
  font-size: 15px;
  line-height: 1;
}

.auth-provider-icon.telegram {
  background: linear-gradient(135deg, #2aabee, #178acc);
}

.auth-provider-hint {
  min-height: 18px;
  font-size: 12px;
}

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: auto minmax(0, 1fr);
  align-items: center;
  padding: 8px 10px 6px 18px;
  gap: 4px;
}

.brand-lockup {
  display: grid;
  justify-self: start;
  transform: translateX(0);
}

.brand-lockup img {
  width: 84px;
  max-width: 100%;
  height: 32px;
  display: block;
  object-fit: contain;
  object-position: 48% top;
  transform: translateY(4px);
}

.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;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}

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

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

.top-actions .service-link {
  color: var(--leaf-dark);
  border-color: rgba(135, 60, 145, 0.22);
  background: #fff7fd;
}

.top-actions .ghost-button.active,
.top-actions .ghost-button[aria-pressed="true"] {
  color: #873c91;
  border-color: rgba(135, 60, 145, 0.34);
  background: rgba(135, 60, 145, 0.12);
  box-shadow: 0 6px 16px rgba(135, 60, 145, 0.12);
}

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

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

.step-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 22px 7px;
}

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

.meal-tabs button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.76);
  color: var(--muted);
  font-size: 9.4px;
  font-weight: 900;
  line-height: 1;
  padding: 0 3px;
  white-space: nowrap;
}

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

.meal-tabs .generate-tab-button {
  background: linear-gradient(135deg, #873c91, #c45ca8);
  font-size: 9.4px;
}

.meal-tabs .generate-tab-button.is-generating {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: .9;
  background: #fff0fb;
  color: #873c91;
  border-color: rgba(135, 60, 145, 0.42);
}

.meal-tabs .generate-tab-button.is-generating::before {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(50% - 8.5px);
  width: 17px;
  min-width: 17px;
  height: 17px;
  border: 2px solid rgba(135, 60, 145, 0.18);
  border-top-color: #873c91;
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

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

.profile-kind-filter button {
  min-height: 28px;
  border: 1px solid rgba(168, 92, 164, 0.18);
  border-radius: 9px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: 9.2px;
  font-weight: 900;
  white-space: nowrap;
}

.profile-kind-filter button.active {
  background: #fff0fb;
  color: #873c91;
  border-color: rgba(135, 60, 145, 0.34);
}

.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: 6px;
  margin: 0;
}

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

.meal-kind-filter button {
  -webkit-tap-highlight-color: transparent;
}

.meal-kind-filter button.active,
.meal-kind-filter button.active:active,
.meal-kind-filter button[aria-pressed="true"],
.meal-kind-filter button[aria-pressed="true"]:active {
  background: #fff0fb !important;
  color: #873c91 !important;
  border-color: rgba(135, 60, 145, 0.34) !important;
  box-shadow: 0 0 0 1px rgba(135, 60, 145, 0.18), 0 10px 22px rgba(168, 92, 164, 0.08) !important;
}

.meal-kind-filter button.active svg,
.meal-kind-filter button[aria-pressed="true"] svg {
  stroke: #873c91 !important;
}

.meal-kind-filter svg {
  width: 22px;
  height: 22px;
  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;
}

.generate-panel {
  display: grid;
  gap: 4px;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(168, 92, 164, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(135, 60, 145, 0.08);
}

.generate-panel span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.generate-panel.is-generating {
  border-color: rgba(189, 95, 167, 0.34);
  box-shadow: 0 14px 34px rgba(135, 60, 145, 0.14);
}

.generation-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  color: var(--leaf-dark);
}

.generation-status i {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid rgba(135, 60, 145, 0.18);
  border-top-color: var(--leaf);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.generation-status b {
  font-size: 11px;
  font-weight: 900;
}

.primary-button:disabled {
  opacity: 0.78;
  cursor: wait;
}

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

.favorite-card {
  display: grid;
  grid-template-columns: clamp(136px, 41vw, 158px) minmax(0, 1fr);
  gap: 11px;
  align-items: stretch;
  padding: 8px 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  cursor: pointer;
}

.favorite-card-media {
  position: relative;
  aspect-ratio: 1;
  min-height: 0;
}

.photo-action-row {
  position: absolute;
  inset: auto 6px 9px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.photo-action-row .heart-button,
.photo-action-row .remove-recipe-button {
  pointer-events: auto;
}

.favorite-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.favorite-card-body {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  align-content: stretch;
  align-self: stretch;
  min-width: 0;
}

.card-overlay-actions {
  position: static;
  display: grid;
  grid-template-columns: repeat(5, 23px);
  align-items: center;
  justify-content: space-between;
  justify-items: center;
  gap: 3px;
  width: 100%;
  align-self: end;
  height: 25px;
  margin-bottom: 9px;
  overflow: visible;
}

.meal-type-chip,
.heart-button,
.remove-recipe-button,
.add-day-button {
  position: relative;
  width: 23px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  box-sizing: border-box;
  padding: 0;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.86);
  color: #873c91;
  box-shadow: 0 6px 16px rgba(62, 23, 68, 0.12);
  backdrop-filter: blur(8px);
}

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

.favorite-card strong {
  display: -webkit-box;
  font-size: 12.6px;
  line-height: 1.16;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.favorite-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.6px;
  line-height: 1.25;
  font-weight: 800;
}

.recipe-preview-nutrition {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 5px;
}

.recipe-preview-nutrition div:not(.preview-nutrition-time) {
  display: grid;
  grid-template-columns: 7px minmax(46px, 1fr) auto auto;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.05;
  font-weight: 850;
}

.recipe-preview-nutrition i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.recipe-preview-nutrition span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.recipe-preview-nutrition b,
.recipe-preview-nutrition em {
  color: var(--ink);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.recipe-preview-nutrition em {
  color: var(--muted);
}

.favorite-card .recipe-preview-nutrition em {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.05;
}

.preview-nutrition-time {
  color: var(--leaf-dark);
  font-size: 8.5px;
  font-weight: 950;
}

.favorite-card em {
  display: block;
  margin-top: 5px;
  color: #873c91;
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 900;
}

.favorite-card .meal-type-chip {
  width: 23px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin-top: 0;
  padding: 0;
  color: #873c91;
  font-size: 8px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.meal-type-chip svg {
  width: 13.5px;
  height: 13.5px;
  flex: 0 0 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meal-type-chip small {
  position: absolute;
  right: 2px;
  bottom: 1px;
  color: inherit;
  font-size: 6.5px;
  line-height: 1;
  font-weight: 950;
}

.heart-button {
  border: 1px solid rgba(168, 92, 164, 0.24);
  color: #a85ca4;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.heart-button svg {
  width: 13.5px;
  height: 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heart-button.active {
  background: #f4d7ef;
  color: #873c91;
  border-color: rgba(135, 60, 145, 0.28);
}

.heart-button.active svg {
  fill: currentColor;
}

.remove-recipe-button {
  border: 1px solid rgba(150, 92, 120, 0.2);
  color: #8e6a82;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.remove-recipe-button svg {
  width: 13.5px;
  height: 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.add-day-button {
  border: 1px solid rgba(135, 60, 145, 0.24);
  color: #873c91;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.add-day-button svg {
  width: 13.5px;
  height: 13.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.remove-recipe-button:hover,
.heart-button:hover,
.add-day-button:hover {
  transform: translateY(-1px);
}

.add-day-button:hover {
  background: #f3e3fb;
  border-color: rgba(135, 60, 145, 0.32);
}

.remove-recipe-button:hover {
  background: #fff2f6;
  color: #9b3d6a;
  border-color: rgba(155, 61, 106, 0.28);
}

.danger-action {
  color: #8e4569;
}

.empty-favorites {
  padding: 14px;
  border: 1px dashed rgba(168, 92, 164, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.generating-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.generating-empty i {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(135, 60, 145, 0.18);
  border-top-color: var(--leaf);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  min-height: 32px;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  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,
#dayScreen {
  overflow-y: auto;
  overflow-x: hidden;
}

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

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

.profile-strip {
  display: grid;
  grid-template-columns: 1fr;
  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-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-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.profile-actions .ghost-button {
  min-height: 36px;
  border-color: rgba(135, 60, 145, 0.24);
  background: #fff7fd;
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.partner-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.partner-entry b,
.partner-entry small {
  display: block;
}

.partner-entry b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.partner-entry small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 750;
}

.partner-entry button {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #a85ca4;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.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;
  max-height: min(470px, calc(100vh - 310px));
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: cardRise 260ms ease both;
}

.quiz-card:has(.fast-picker:not(.hidden)) {
  padding-bottom: 16px;
}

.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: calc(100vh - 255px);
  min-height: min(500px, calc(100vh - 292px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 12px 16px 16px;
}

.goal-summary:not(.hidden) {
  margin-bottom: 72px;
}

@media (min-height: 780px) {
  .goal-summary {
    max-height: 535px;
    min-height: 470px;
  }
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f6eafa;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 800;
}

.prompt-chips span svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prompt-chips span i {
  font-style: normal;
}

.recipe-mask-chips {
  margin-top: 6px;
}

.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: 12px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7fd, #f3e8ff);
}

.quiz-card:has(.location-picker:not(.hidden)) {
  max-height: none;
  overflow: visible;
  padding: 12px;
}

.quiz-card:has(.body-metrics-picker:not(.hidden)) {
  max-height: none;
  overflow: visible;
  padding: 12px;
}

.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: 58px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  font: inherit;
  font-size: 17px;
  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: 12px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7fd, #f3e8ff);
  border: 1px solid var(--line);
}

.picker-label {
  display: block;
  margin: 0 0 7px;
  color: var(--leaf-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.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: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7fd, #f4ecff);
}

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

.branch-input {
  width: 100%;
  height: 42px;
  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;
}

.body-metrics-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(168, 92, 164, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(248,237,248,.84));
}

.body-metrics-picker label {
  display: grid;
  grid-template-columns: 1fr 24px;
  align-items: center;
  gap: 6px;
  color: var(--leaf-dark);
  font-size: 12px;
  font-weight: 900;
}

.body-metrics-picker label span {
  grid-column: 1 / -1;
  text-transform: uppercase;
}

.body-metrics-picker input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  outline: none;
  padding: 0 12px;
}

.body-metrics-picker input:focus {
  border-color: rgba(168, 92, 164, 0.72);
  box-shadow: 0 0 0 4px rgba(168, 92, 164, 0.12);
}

.body-metrics-picker b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.body-metrics-summary {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border: 1px solid rgba(168, 92, 164, 0.18);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
}

.popular-search {
  margin: 0 0 10px;
}

.popular-search label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(168, 92, 164, 0.22);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
}

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

.popular-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  outline: none;
}

.popular-search input::placeholder {
  color: #a68ca5;
}

.popular-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.popular-search-clear {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f7e9f5;
  color: #873c91;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.popular-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 5px 2px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.popular-search-reset {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid rgba(168, 92, 164, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #873c91;
  font: inherit;
  cursor: pointer;
}

.day-ration-head {
  display: block;
  margin-bottom: 8px;
}

.day-ration-head h2 {
  display: none;
}

.day-ration-head p:not(.section-kicker) {
  display: inline-block;
  margin: 0;
  width: fit-content;
  max-width: calc(100% - 8px);
  padding: 5px 8px;
  border: 1px solid rgba(168, 92, 164, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: #873c91;
  font-size: 9.5px;
  line-height: 1.25;
  font-weight: 900;
}

.day-ration-head .secondary-button {
  width: auto;
  min-width: 82px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11px;
}

.day-ration-head .section-kicker {
  display: none;
}

.day-sticky-summary {
  position: relative;
  z-index: 7;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 22px 7px;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(255,250,255,.94) 82%, rgba(255,250,255,0));
}

.day-sticky-summary .day-bju-compare {
  margin-bottom: 0;
}

.day-target-card,
.day-macro-grid > div,
.day-ration-item {
  border: 1px solid rgba(168, 92, 164, 0.18);
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 28px rgba(135, 60, 145, 0.08);
}

.day-target-card {
  display: grid;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 16px;
  margin-bottom: 8px;
}

.day-target-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.day-target-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.day-target-card strong {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  color: var(--ink);
  line-height: 1;
}

.day-target-card strong span {
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  text-transform: none;
}

.day-target-card strong small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 950;
  text-transform: uppercase;
}

.day-target-card i {
  grid-column: 1 / -1;
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1dff0;
}

.day-target-card i::after,
.day-progress-strip i::after {
  content: "";
  position: absolute;
  left: var(--goal-pos, 100%);
  top: 50%;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: var(--macro-calorie);
  transform: translate(-1px, -50%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.78), 0 4px 10px rgba(240, 160, 0, 0.2);
}

.day-target-card i b {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 220ms ease;
}

.day-calorie-goal {
  display: none !important;
}

.day-calorie-fact {
  background: linear-gradient(90deg, #873c91, #c45ca8);
}

.day-target-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 850;
}

.day-target-card p:empty {
  display: none;
}

.day-clear-inline {
  display: inline-grid;
  place-items: center;
  min-height: 19px;
  padding: 0 8px;
  border: 1px solid rgba(135, 60, 145, 0.34);
  border-radius: 999px;
  background: rgba(135, 60, 145, 0.1);
  color: #873c91;
  font-size: 8px;
  font-weight: 950;
  cursor: pointer;
}

.day-bju-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.day-bju-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(168, 92, 164, 0.18);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 28px rgba(135, 60, 145, 0.08);
}

.day-bju-card-combined {
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

.day-bju-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.day-bju-headline span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 950;
  text-transform: uppercase;
}

.day-calorie-mini {
  display: block;
  margin-top: -2px;
}

.day-calorie-mini i {
  position: relative;
  display: block;
  height: 6px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(168, 92, 164, 0.11);
}

.day-calorie-mini i::after {
  content: "";
  position: absolute;
  left: var(--goal-pos, 100%);
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--macro-calorie);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(255,255,255,.82), 0 4px 10px rgba(240, 138, 36, 0.24);
  z-index: 2;
}

.day-calorie-mini b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #873c91, #c45ca8);
  transition: width 220ms ease;
}

.day-bju-card.over-limit .day-calorie-mini i {
  background: linear-gradient(90deg, rgba(168, 92, 164, 0.1) 0 var(--goal-pos, 100%), rgba(194, 73, 96, 0.14) var(--goal-pos, 100%) 100%);
}

.day-bju-card.over-limit .day-calorie-mini i::after {
  background: var(--macro-calorie);
  box-shadow: 0 0 0 3px rgba(255,255,255,.82), 0 4px 10px rgba(240, 138, 36, 0.24);
}

.day-bju-card.over-limit .day-calorie-mini b {
  background: linear-gradient(90deg, #873c91 0%, #c45ca8 calc(var(--goal-pos, 100%) - 2%), #d66a7e var(--goal-pos, 100%), #b84c69 100%);
}

.day-bju-card > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.day-bju-combined-layout {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.day-donut-stack {
  display: grid;
  gap: 3px;
  justify-items: center;
  align-items: center;
}

.day-bju-donut {
  width: 74px;
  height: 74px;
}

.day-bju-dual-donut {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 49%),
    conic-gradient(
      var(--macro-protein) 0 calc(var(--p, 0) * 1%),
      var(--macro-fat) calc(var(--p, 0) * 1%) calc((var(--p, 0) + var(--f, 0)) * 1%),
      var(--macro-carb) calc((var(--p, 0) + var(--f, 0)) * 1%) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%),
      var(--macro-fiber) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%) 100%
    );
}

.day-bju-dual-donut::before {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 44%, transparent 45%),
    conic-gradient(
      #caa6d1 0 calc(var(--tp, 0) * 1%),
      #edb4d0 calc(var(--tp, 0) * 1%) calc((var(--tp, 0) + var(--tf, 0)) * 1%),
      #b6cdef calc((var(--tp, 0) + var(--tf, 0)) * 1%) calc((var(--tp, 0) + var(--tf, 0) + var(--tc, 0)) * 1%),
      #a8d8ca calc((var(--tp, 0) + var(--tf, 0) + var(--tc, 0)) * 1%) 100%
    );
  box-shadow: 0 0 0 2px #fff;
}

.day-bju-dual-donut b,
.day-bju-dual-donut small,
.day-bju-dual-donut em {
  position: relative;
  z-index: 1;
}

.day-bju-dual-donut em {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.day-bju-dual-donut b {
  color: var(--ink);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.day-bju-dual-donut small {
  color: var(--muted);
  max-width: 42px;
  text-align: center;
  font-size: 6px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.day-bju-donut b {
  font-size: 13px;
}

.day-bju-legend {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.day-bju-legend div {
  display: grid;
  grid-template-columns: 8px minmax(48px, 1fr) auto;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1.1;
}

.day-bju-dual-legend {
  gap: 3px;
}

.day-bju-dual-legend .day-bju-table-head,
.day-bju-dual-legend .day-bju-table-row {
  grid-template-columns: 8px minmax(44px, 1fr) minmax(54px, 54px) minmax(54px, 54px);
}

.day-bju-dual-legend .day-bju-table-head {
  color: #873c91;
  font-size: 8px;
  text-transform: uppercase;
}

.day-bju-dual-legend .day-bju-table-head span {
  grid-column: 1 / 3;
}

.day-bju-dual-legend .day-bju-table-head b,
.day-bju-dual-legend .day-bju-table-head em {
  color: #873c91;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.day-bju-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.day-bju-legend i.calorie {
  background: var(--macro-calorie);
}

.day-bju-legend b {
  color: var(--ink);
  font-size: 8px;
  white-space: nowrap;
}

.day-bju-legend em {
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.day-bju-card > p,
.day-bju-compare > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(168, 92, 164, 0.16);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 850;
}

.day-profile-chip {
  width: fit-content;
  max-width: 100%;
  padding: 0 8px !important;
  min-height: 19px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(135, 60, 145, 0.34) !important;
  border-radius: 999px !important;
  background: rgba(135, 60, 145, 0.1);
  color: #873c91 !important;
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.day-summary-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-summary-actions .day-profile-chip {
  margin: 0;
}

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

.day-macro-grid > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 14px;
}

.day-macro-grid strong {
  color: var(--leaf-dark);
  font-size: 16px;
  line-height: 1;
}

.day-macro-grid span,
.day-macro-grid small {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 850;
}

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

.day-ration-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 14px;
}

.day-ration-item > button:first-child {
  min-width: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0;
  text-align: left;
}

.day-ration-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}

.day-ration-item span,
.day-ration-item strong,
.day-ration-item small {
  display: block;
}

.day-ration-item strong {
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.2;
}

.day-ration-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.day-remove-button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(168, 92, 164, 0.2);
  border-radius: 9px;
  background: rgba(255,255,255,.82);
  color: #873c91;
  font-size: 18px;
  line-height: 1;
}

.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;
}

#quizScreen[data-step-bg="quick"] .option-grid {
  max-height: none;
  overflow: visible;
}

#quizScreen[data-step-bg="quick"] .option-button {
  min-height: 58px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.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%);
}

body.keyboard-open .screen.active {
  overflow-y: auto;
  padding-bottom: 92px;
}

body.keyboard-open .quiz-card:has(.location-picker:not(.hidden)) {
  padding: 10px;
}

body.keyboard-open .quiz-card:has(.body-metrics-picker:not(.hidden)) {
  padding: 10px;
}

body.keyboard-open .location-picker {
  margin-top: 6px;
  padding: 8px;
}

body.keyboard-open .bottom-actions {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
}

body.keyboard-open .screen::before {
  opacity: 0.06;
}

.bottom-actions.profile-review-actions {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}

.bottom-actions.profile-review-actions .primary-button,
.bottom-actions.profile-review-actions .secondary-button {
  height: 42px;
  border-radius: 10px;
  font-size: 11px;
  padding: 0 6px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1;
  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;
}

.dish-limit-card {
  display: grid;
  grid-template-columns: auto auto minmax(72px, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(168, 92, 164, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
}

.dish-limit-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.dish-limit-card strong {
  color: #873c91;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.dish-limit-card i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1e3f2;
}

.dish-limit-card i.low {
  background: #faedf3;
}

.dish-limit-card b {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #873c91, #c45ca8);
  transition: width 240ms ease;
}

.dish-limit-card i.low b {
  background: linear-gradient(90deg, #c45ca8, #df8f9f);
}

.day-progress-strip {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(168, 92, 164, 0.2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(135, 60, 145, 0.08);
}

.day-progress-strip.hidden {
  display: none;
}

.day-progress-strip > div:last-child {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 3px 8px;
  min-width: 0;
}

.day-progress-strip span,
.day-progress-strip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
}

.day-progress-strip strong {
  color: #873c91;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  text-align: right;
}

.day-progress-strip small {
  grid-column: 1 / -1;
  display: grid;
  gap: 1px;
  overflow: hidden;
  white-space: normal;
}

.day-progress-strip small span {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.day-progress-strip small b {
  color: #873c91;
  font-weight: 950;
}

.day-progress-strip i {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1e3f2;
}

.day-progress-strip i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #873c91, #c45ca8);
  transition: width 220ms ease;
}

.day-progress-strip.over-limit i b,
.day-target-card.over-limit .day-calorie-fact {
  background: linear-gradient(90deg, #873c91 0%, #c45ca8 calc(var(--goal-pos, 100%) - 2%), #d66a7e var(--goal-pos, 100%), #b84c69 100%);
}

.day-progress-mini-donut,
.day-bju-donut {
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(
      var(--macro-protein) 0 calc(var(--p, 0) * 1%),
      var(--macro-fat) calc(var(--p, 0) * 1%) calc((var(--p, 0) + var(--f, 0)) * 1%),
      var(--macro-carb) calc((var(--p, 0) + var(--f, 0)) * 1%) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%),
      var(--macro-fiber) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%) 100%
    );
}

.day-progress-mini-donut {
  position: relative;
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 49%),
    conic-gradient(
      var(--macro-protein) 0 calc(var(--p, 0) * 1%),
      var(--macro-fat) calc(var(--p, 0) * 1%) calc((var(--p, 0) + var(--f, 0)) * 1%),
      var(--macro-carb) calc((var(--p, 0) + var(--f, 0)) * 1%) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%),
      var(--macro-fiber) calc((var(--p, 0) + var(--f, 0) + var(--c, 0)) * 1%) 100%
    );
}

.day-progress-mini-donut::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 43%, transparent 44%),
    conic-gradient(
      #caa6d1 0 calc(var(--tp, 0) * 1%),
      #edb4d0 calc(var(--tp, 0) * 1%) calc((var(--tp, 0) + var(--tf, 0)) * 1%),
      #b6cdef calc((var(--tp, 0) + var(--tf, 0)) * 1%) calc((var(--tp, 0) + var(--tf, 0) + var(--tc, 0)) * 1%),
      #a8d8ca calc((var(--tp, 0) + var(--tf, 0) + var(--tc, 0)) * 1%) 100%
    );
  box-shadow: 0 0 0 1px #fff;
}

.day-progress-mini-donut b,
.day-bju-donut b {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 9px;
  line-height: 1;
  font-weight: 950;
}

.day-progress-mini-donut small,
.day-bju-donut small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 5.5px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.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(
      var(--macro-protein) 0 calc(var(--p) * 1%),
      var(--macro-fat) calc(var(--p) * 1%) calc((var(--p) + var(--f)) * 1%),
      var(--macro-carb) calc((var(--p) + var(--f)) * 1%) calc((var(--p) + var(--f) + var(--c)) * 1%),
      var(--macro-fiber) 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 minmax(62px, 1fr) minmax(48px, auto) minmax(34px, auto);
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 850;
}

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

.donut-legend b {
  text-align: right;
  font-size: 10.5px;
  white-space: nowrap;
}

.donut-legend em {
  color: var(--muted);
  text-align: right;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.recipe-nutrition-head {
  color: var(--muted);
  font-size: 9.5px !important;
  text-transform: uppercase;
}

.recipe-nutrition-head span {
  grid-column: 1 / 3;
}

.recipe-calorie-row {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(168, 92, 164, 0.14);
}

.calorie { background: var(--macro-calorie); }
.protein { background: var(--macro-protein); }
.fat { background: var(--macro-fat); }
.carb { background: var(--macro-carb); }
.fiber { background: var(--macro-fiber); }

.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: 70px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 10px;
  height: 126px;
  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));
  overflow: hidden;
}

.ingredient-delivery > div:not(.ad-action-column),
.compact-ad > div:not(.ad-logo-slot),
.partner-inline > div:not(.ad-logo-slot) {
  min-width: 0;
  overflow: hidden;
}

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

.ingredient-delivery strong {
  font-size: 12px;
  line-height: 1.08;
  color: var(--ink);
  text-transform: uppercase;
}

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

.ingredient-delivery b,
.partner-offer {
  margin-top: 4px;
  color: var(--leaf-dark);
  font-size: 10px;
  line-height: 1.08;
  font-weight: 950;
  white-space: nowrap;
}

.ingredient-delivery em {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.08;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.ad-action-column {
  width: 78px;
  min-width: 0;
  display: grid;
  grid-template-rows: 58px 30px;
  align-content: start;
  justify-items: center;
  gap: 8px;
  overflow: hidden;
}

.ad-text-column {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
}

.ingredient-delivery a,
.local-ad a,
.partner-block a,
.day-ration-ad a,
.partner-free-slot [data-partner-call] {
  box-sizing: border-box;
  width: 100%;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 9px;
  background: linear-gradient(135deg, #873c91, #b85fa8);
  color: #fff;
  box-shadow: 0 9px 18px rgba(135, 60, 145, 0.16);
  text-decoration: none;
  font-size: 9.4px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  justify-self: stretch;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-city-line {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.4px;
  font-weight: 850;
  line-height: 1.08;
}

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

.recipe-share-actions .secondary-button {
  min-height: 38px;
  font-size: 12px;
}

.recipe-share-actions .primary-button {
  min-height: 42px;
}

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

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

.macro-grid strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.macro-grid span {
  margin-top: 2px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.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;
  height: 126px;
  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;
  overflow: hidden;
}

.compact-ad {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-bottom: 8px;
}

.partner-count {
  display: none;
}

.ad-logo-slot {
  width: 57px;
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: 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[data-logo-text]::before {
  content: attr(data-logo-text);
  max-width: 100%;
  padding: 0 4px;
  color: var(--leaf-dark);
  font-size: 9.5px;
  line-height: 1.05;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.ad-logo-slot.has-logo::before {
  content: none;
}

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

.ad-logo-slot img:not([src]),
.ad-logo-slot img[src=""] {
  display: none;
}

.local-ad.partner-unavailable,
.partner-block.partner-unavailable {
  border-style: dashed;
}

.partner-unavailable .ad-logo-slot img {
  display: none;
}

.partner-unavailable .ad-logo-slot::before {
  content: "";
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 7px;
  border: 2px solid rgba(135, 60, 145, 0.42);
  background:
    linear-gradient(90deg, transparent 45%, rgba(135, 60, 145, 0.42) 45% 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(135, 60, 145, 0.42) 45% 55%, transparent 55%);
}

.partner-free-slot .section-kicker,
.partner-free-slot [data-partner-name],
.partner-free-slot .partner-offer,
.partner-free-slot [data-partner-offer],
.partner-free-slot .partner-phone,
.partner-free-slot [data-partner-line],
.partner-free-slot [data-partner-phone] {
  white-space: normal !important;
  overflow: visible;
  text-overflow: clip;
}

.partner-free-slot .section-kicker,
.partner-free-slot [data-partner-name] {
  font-size: 10.4px;
  line-height: 1.08;
}

.partner-free-slot .partner-offer,
.partner-free-slot [data-partner-offer],
.partner-free-slot .partner-phone,
.partner-free-slot [data-partner-line],
.partner-free-slot [data-partner-phone] {
  font-size: 9.5px !important;
  line-height: 1.08 !important;
}

.partner-unavailable h3 {
  color: var(--leaf-dark);
}

.partner-free-slot .partner-phone,
.partner-free-slot .partner-city-line {
  display: block;
}

.partner-free-slot.local-ad h3 {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.12;
}

.local-ad h3,
.local-ad .section-kicker,
.local-ad .partner-city-line,
.ingredient-delivery strong,
.partner-inline p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-ad .partner-phone,
.ingredient-delivery span,
.ingredient-delivery b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.partner-banner-mode {
  position: relative;
  background-image: var(--partner-banner);
  background-size: cover;
  background-position: center;
}

.partner-banner-mode::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.24), rgba(255,255,255,.08));
  pointer-events: none;
}

.partner-banner-mode > :not(.ad-action-column):not(.partner-inline),
.partner-banner-mode .partner-inline > :not(.ad-action-column),
.partner-banner-mode .ad-action-column .ad-logo-slot {
  visibility: hidden;
}

.partner-banner-mode [data-partner-call],
.day-ration-ad.partner-banner-mode a {
  position: relative;
  z-index: 1;
}

.partner-count {
  display: none;
}

@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); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@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: 10px;
  line-height: 1.05;
  font-weight: 850;
  white-space: nowrap;
}

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

.partner-phone {
  color: var(--ink) !important;
  font-size: 10.5px !important;
  font-weight: 900;
  line-height: 1.08 !important;
  white-space: nowrap;
}

.local-ad .section-kicker,
.partner-inline [data-partner-name] {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.08;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.partner-offer {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.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 {
  display: grid;
  gap: 2px;
  color: #873c91;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.tariff-price-old {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-decoration: line-through;
}

.tariff-price-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.tariff-price-current {
  color: #873c91;
  font-size: 16px;
  font-weight: 950;
}

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

.receipt-field {
  display: grid;
  gap: 4px;
  margin: 8px 0;
}

.receipt-field span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
}

.receipt-field input {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(168, 92, 164, 0.22);
  border-radius: 10px;
  background: rgba(255,255,255,.9);
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: none;
}

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

.promo-field input {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(168, 92, 164, 0.24);
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  outline: none;
}

.promo-field .secondary-button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 11px;
  white-space: nowrap;
}

.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;
}

.terms-check a {
  color: var(--brand);
  font-weight: 900;
}

.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;
}

.limit-paywall-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(168, 92, 164, 0.24);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,237,248,.88));
}

.limit-paywall-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.limit-points {
  display: grid;
  gap: 8px;
}

.limit-points div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(168, 92, 164, 0.18);
}

.limit-points div:last-child {
  border-bottom: 0;
}

.limit-points span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f6eafa;
  color: #873c91;
  font-size: 11px;
  font-weight: 950;
}

.limit-points strong {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.25;
}

.limit-modal .modal-body {
  padding-top: 0;
}

.partner-block a {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #873c91, #b85fa8);
  color: #fff;
  box-shadow: 0 9px 18px rgba(135, 60, 145, 0.16);
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
}

.partner-block {
  overflow: hidden;
}

.partner-inline {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 108px;
  overflow: visible;
}

.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;
}

.partner-modal {
  max-height: min(760px, 92vh);
}

.partner-register-form,
.partner-terms-form,
.partner-privacy-form,
.partner-privacy-gate {
  display: grid;
  gap: 10px;
}

.partner-register-form > label,
.partner-terms-form > label,
.partner-privacy-form > label {
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.partner-register-form input,
.partner-register-form select,
.partner-register-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.partner-register-form textarea {
  resize: vertical;
}

.partner-promo-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.partner-promo-check button {
  min-height: 42px;
  border: 1px solid rgba(196, 92, 168, 0.28);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--brand);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.partner-promo-check button:disabled {
  opacity: .62;
}

.partner-register-form input[readonly] {
  background: rgba(248, 237, 248, 0.72);
  color: var(--leaf-dark);
}

.partner-register-form label > small,
.partner-auth-note,
.partner-form-status {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
  font-weight: 750;
}

.partner-register-form label > small[data-state="success"] {
  color: #257847;
}

.partner-register-form label > small[data-state="failed"] {
  color: #a8293f;
}

.partner-register-form .partner-auth-field {
  padding: 9px;
  border: 1px solid rgba(196, 92, 168, 0.24);
  border-radius: 8px;
  background: rgba(248, 237, 248, 0.72);
}

.partner-register-form .partner-auth-field > span {
  color: var(--leaf-dark);
}

.partner-terms-panel {
  display: grid;
  gap: 12px;
}

.partner-code-panel {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.partner-code-panel span,
.partner-code-panel small,
.partner-code-panel strong {
  display: block;
}

.partner-code-panel strong {
  margin: 4px 0;
  color: #873c91;
  font-size: 26px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.partner-tip {
  margin: 0 0 10px;
  border: 1px solid rgba(216, 60, 139, 0.18);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--ink);
  padding: 10px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.partner-referral-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 11px;
  border: 1px solid rgba(216, 60, 139, 0.22);
  border-radius: 8px;
  background: #fff;
}

.partner-referral-panel > span,
.partner-referral-panel small,
.partner-referral-panel p,
.partner-referral-source-head {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
}

.partner-referral-warning {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(216, 60, 139, 0.18);
  border-radius: 8px;
  background: #fff7fb;
  padding: 9px;
}

.partner-referral-warning p {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.partner-referral-warning strong {
  color: #d83c8b;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.25;
}

.partner-referral-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.partner-referral-row input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7fb;
  color: var(--ink);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.partner-referral-row button {
  justify-self: start;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 0 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.partner-referral-source-row {
  min-width: 0;
  border: 1px solid rgba(216, 60, 139, 0.14);
  border-radius: 8px;
  background: #fff7fb;
  padding: 8px;
}

.partner-referral-primary,
.partner-referral-sources {
  display: grid;
  gap: 6px;
}

.partner-referral-sources {
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.partner-referral-details {
  min-width: 0;
  border-top: 1px solid rgba(216, 60, 139, 0.14);
  padding-top: 8px;
}

.partner-referral-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.partner-referral-details summary::after {
  content: "v";
  color: var(--brand);
  font-size: 14px;
  line-height: 1;
}

.partner-referral-details[open] summary::after {
  transform: rotate(180deg);
}

.partner-referral-details:not([open]) .partner-referral-sources {
  display: none;
}

.partner-referral-source-head,
.partner-referral-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 68px;
  gap: 8px;
  align-items: center;
}

.partner-referral-source-head {
  padding: 0 8px;
  text-transform: uppercase;
}

.partner-referral-source-row b,
.partner-referral-source-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.partner-referral-source-row a {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.partner-referral-source-row b,
.partner-referral-source-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.partner-referral-source-row strong {
  text-align: center;
}

.partner-referral-source-row small {
  color: var(--muted);
  font-size: 9px;
}

.partner-period-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.partner-period-mode {
  display: flex !important;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink) !important;
  text-transform: none !important;
}

.partner-period-mode input {
  width: auto;
  min-height: auto;
  margin: 0 7px 0 0;
}

.partner-period-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.partner-period-form > label:not(.partner-period-mode):not(.terms-check),
.partner-period-form > button {
  display: none;
}

.partner-period-form.period-mode > label:not(.partner-period-mode):not(.terms-check) {
  display: grid;
}

.partner-period-form.period-mode > button {
  display: block;
}

.partner-period-form.period-mode {
  grid-template-columns: 1fr 1fr auto;
}

.partner-period-mode {
  grid-column: span 1;
}

.partner-period-form input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.partner-period-form button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.partner-period-title {
  margin: 12px 0 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}

.partner-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 18px;
}

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

.partner-rates div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(216, 60, 139, 0.2);
  border-radius: 8px;
  background: #fff7fb;
}

.partner-rates span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.partner-rates b {
  color: var(--brand);
  font-size: 17px;
}

.partner-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.partner-metrics b,
.partner-metrics span {
  display: block;
}

.partner-metrics b {
  color: var(--ink);
  font-size: 16px;
}

.partner-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.info-hint {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border: 1px solid rgba(196, 92, 168, 0.32);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  padding: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 950;
  vertical-align: middle;
}

.info-hint::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(220px, 72vw);
  transform: translateX(-50%);
  border: 1px solid rgba(196, 92, 168, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 30px rgba(91, 56, 96, 0.18);
  color: var(--ink);
  padding: 8px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.info-hint:hover::after,
.info-hint:focus::after,
.info-hint:focus-visible::after {
  opacity: 1;
}

.partner-ledger {
  margin-top: 16px;
}

.partner-ledger h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.partner-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.partner-ledger-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.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, minmax(0, 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: 10.6px;
  font-weight: 900;
  gap: 5px;
  padding: 6px;
}

.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: 10px;
  margin-bottom: 10px;
}

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

.recipe-nutrition-card .macro-grid {
  display: none;
}

.recipe-nutrition-card .nutrition-donut {
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(168, 92, 164, 0.16);
  border-radius: 14px;
  background: #fff8ff;
}

.recipe-nutrition-card .donut {
  width: 76px;
  height: 76px;
  align-content: center;
}

.recipe-nutrition-card .donut span {
  max-width: 58px;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  transform: translateY(-2px);
  white-space: nowrap;
}

.recipe-nutrition-card .donut-legend {
  gap: 2px;
  min-width: 0;
}

.recipe-nutrition-card .donut-legend div {
  grid-template-columns: 8px minmax(58px, 1fr) minmax(48px, auto) minmax(32px, auto);
  gap: 5px;
  min-width: 0;
  padding: 1px 0;
  font-size: 10.8px;
  line-height: 1.08;
}

.recipe-nutrition-card .donut-legend .legend-head {
  grid-template-columns: 8px minmax(58px, 1fr) minmax(58px, auto) minmax(38px, auto);
  padding: 0 0 1px;
}

.recipe-nutrition-card .donut-legend .legend-head::before {
  content: "";
}

.recipe-nutrition-card .donut-legend i {
  width: 8px;
  height: 8px;
}

.recipe-nutrition-card .donut-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipe-nutrition-card .donut-legend b,
.recipe-nutrition-card .donut-legend em {
  max-width: 58px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  font-size: 10.8px;
  line-height: 1.08;
  text-align: right;
  white-space: nowrap;
}

.recipe-nutrition-card .donut-legend em {
  color: var(--muted);
  padding-left: 6px;
  border-left: 1px solid rgba(168, 92, 164, 0.16);
}

.recipe-nutrition-card .donut-legend .legend-head b,
.recipe-nutrition-card .donut-legend .legend-head em {
  color: var(--brand);
  font-size: 10px;
  font-weight: 950;
  border-left: 0;
}

.recipe-nutrition-card .donut-legend .calorie-row {
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid rgba(168, 92, 164, 0.14);
}

.recipe-nutrition-card .donut-legend .calorie-row b,
.recipe-nutrition-card .donut-legend .calorie-row em {
  max-width: 62px;
}

.recipe-nutrition-card .recipe-nutrition-head {
  display: none !important;
}

.recipe-nutrition-card .recipe-calorie-row {
  margin-top: 1px;
  padding-top: 4px;
}

.recipe-serving-mini {
  display: inline-grid;
  grid-template-columns: 10px auto;
  align-items: center;
  justify-content: end;
  gap: 1px;
}

.recipe-serving-mini svg {
  width: 10px;
  height: 10px;
  stroke: var(--muted);
  stroke-width: 2.4;
  fill: none;
}

.recipe-serving-mini small {
  color: var(--muted);
  font-size: 7.8px;
  line-height: 1;
  font-weight: 950;
}

#recipeIngredientsText {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 7px;
  overflow-wrap: normal;
}

#recipeIngredientsText span {
  display: inline;
}

#recipeIngredientsText b {
  white-space: nowrap;
  color: var(--leaf-dark);
  font-weight: 900;
}

.ingredient-nutrition-list {
  display: none;
  margin-top: 8px;
  gap: 6px;
}

.validation-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  max-width: min(420px, calc(100vw - 28px));
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(168, 92, 164, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--leaf-dark);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 18px 42px rgba(75, 35, 82, 0.16);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -36%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.generation-start-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 86;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: min(390px, calc(100vw - 28px));
  padding: 13px 15px;
  border: 1px solid rgba(135, 60, 145, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--leaf-dark);
  box-shadow: 0 18px 42px rgba(135, 60, 145, 0.18);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -42%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.generation-start-toast i {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: transparent;
  border: 3px solid rgba(135, 60, 145, 0.16);
  border-top-color: var(--leaf-dark);
  border-right-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(189, 95, 167, 0.08);
  animation: spin 800ms linear infinite;
}

.generation-start-toast i::before {
  content: none;
}

.generation-start-toast i::after {
  content: none;
}

.generation-start-toast span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.generation-start-toast b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 950;
}

.generation-start-toast small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}

.ready-recipe-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 85;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 28px));
  padding: 10px 10px 10px 14px;
  border: 1px solid rgba(216, 181, 218, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(102, 54, 118, 0.18);
  backdrop-filter: blur(14px);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.ready-recipe-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.ready-recipe-toast span {
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
}

.ready-recipe-toast button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--leaf-dark), #a64ca0, var(--leaf));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(135, 60, 145, 0.24);
}

.ingredient-nutrition-list div {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(216, 181, 218, 0.72);
  border-radius: 10px;
  background: rgba(255, 248, 255, 0.78);
}

.ingredient-nutrition-list strong {
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}

.ingredient-nutrition-list span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
}

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

  .partner-promo-check {
    grid-template-columns: 1fr;
  }

  .partner-period-form {
    grid-template-columns: 1fr;
  }

  .partner-period-form.period-mode {
    grid-template-columns: 1fr;
  }

  .info-hint::after {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: none;
    z-index: 120;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 12px;
    line-height: 1.4;
  }

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

  .favorite-card {
    grid-template-columns: clamp(132px, 39vw, 150px) minmax(0, 1fr);
  }

  .nutrition-donut {
    grid-template-columns: 104px 1fr;
    gap: 10px;
  }

  .donut {
    width: 102px;
    height: 102px;
  }

  .donut-legend div {
    grid-template-columns: 9px minmax(52px, 1fr) minmax(42px, auto) minmax(28px, auto);
    gap: 5px;
    font-size: 9.5px;
  }

  .donut-legend b,
  .donut-legend em {
    font-size: 9.5px;
  }

  .recipe-nutrition-card .nutrition-donut {
    grid-template-columns: 72px minmax(0, 1fr);
    justify-items: stretch;
    gap: 7px;
  }

  .recipe-nutrition-card .donut {
    width: 70px;
    height: 70px;
  }

  .recipe-nutrition-card .donut span {
    max-width: 52px;
    font-size: 9.5px;
  }

  .recipe-nutrition-card .donut-legend {
    width: 100%;
  }

  .recipe-nutrition-card .donut-legend div {
    grid-template-columns: 8px minmax(58px, 1fr) minmax(46px, auto) minmax(30px, auto);
    gap: 4px;
    font-size: 10.2px;
  }

  .recipe-nutrition-card .donut-legend b,
  .recipe-nutrition-card .donut-legend em {
    font-size: 10.2px;
  }

  .ingredient-delivery,
  .compact-ad,
  .partner-inline {
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: stretch;
  }

  .ingredient-delivery a,
  .local-ad a,
  .partner-block a,
  .day-ration-ad a {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .ad-action-column a,
  .ingredient-delivery .ad-action-column a,
  .local-ad .ad-action-column a,
  .partner-block .ad-action-column a,
  .day-ration-ad .ad-action-column a {
    grid-column: auto;
    width: 100%;
  }
}
