/* Nutration v1.3 Stage 1C — modern minimal mobile application shell */
html.v13-app-shell-active {
  background: #ffffff;
}

body.v13-app-active {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f8f6;
  --text: #15211d;
  --muted: #74807b;
  --line: #e5ebe8;
  --green-900: #0f5b4a;
  --green-700: #24705d;
  --green-500: #4c8b76;
  --green-100: #edf6f2;
  --shadow: 0 12px 36px rgba(17, 40, 32, .06);
  --radius-lg: 22px;
  --radius-md: 17px;
  --radius-sm: 12px;

  background: #ffffff !important;
  color: var(--text);
}

body.v13-app-active .app-shell {
  width: min(980px, 100%);
  min-height: 100dvh;
  padding: 0 22px calc(108px + env(safe-area-inset-bottom));
}

body.v13-app-active .topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  margin: 0 -22px;
  padding: calc(10px + env(safe-area-inset-top)) 22px 10px;
  border-bottom: 1px solid rgba(229, 235, 232, .85);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

body.v13-app-active .brand {
  gap: 9px;
}

body.v13-app-active .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  box-shadow: none;
  background: var(--green-900);
}

body.v13-app-active .brand-mark::before {
  width: 18px;
  height: 18px;
  top: 9px;
  left: 9px;
  background: #ffffff;
  opacity: .95;
}

body.v13-app-active .brand-mark span {
  width: 7px;
  height: 13px;
  top: 8px;
  left: 19px;
  background: #71a491;
}

body.v13-app-active .brand-name {
  font-size: 15px;
  letter-spacing: -.01em;
}

body.v13-app-active .brand-caption,
body.v13-app-active #connectionStatus,
body.v13-app-active #accountButton {
  display: none !important;
}

body.v13-app-active main {
  padding-top: 24px;
}

body.v13-app-active .v13-shell-hidden {
  display: none !important;
}

body.v13-app-active .v13-screen {
  width: min(100%, 680px);
  margin: 0 auto;
  animation: v13ShellFade .18s ease-out;
}

@keyframes v13ShellFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.v13-page-head {
  padding: 18px 0 24px;
}

.v13-page-kicker {
  margin: 0 0 10px;
  color: var(--green-900);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .13em;
}

.v13-page-head h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 7vw, 44px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.v13-page-head > p:last-child {
  max-width: 540px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.v13-target-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.v13-target-card > div:first-child {
  display: grid;
  gap: 6px;
}

.v13-target-card > div:first-child > span {
  color: var(--muted);
  font-size: 12px;
}

.v13-target-card > div:first-child > strong {
  color: var(--green-900);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.04em;
}

.v13-target-card > div:first-child small {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.v13-target-macros {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 15px;
}

.v13-target-macros span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
}

.v13-target-macros b {
  color: var(--text);
  font-size: 12px;
}

.v13-quick-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.v13-quick-grid > button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.v13-quick-grid > button:active {
  background: var(--surface-soft);
}

.v13-quick-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--green-900);
  background: var(--green-100);
}

.v13-quick-icon svg,
.v13-arrow svg,
.v13-empty-icon svg,
body.v13-app-active .nav-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v13-quick-grid > button > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.v13-quick-grid b {
  color: var(--text);
  font-size: 14px;
}

.v13-quick-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v13-arrow {
  display: grid;
  place-items: center;
  color: #a5afab;
}

.v13-arrow svg {
  width: 18px;
  height: 18px;
}

.v13-home-note {
  margin-top: 14px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.v13-home-note span,
.v13-profile-target > span {
  color: var(--green-900);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.v13-home-note h2 {
  margin: 8px 0 5px;
  color: var(--text);
  font-size: 20px;
  letter-spacing: -.025em;
}

.v13-home-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.v13-profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.v13-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  padding: 0 16px;
}

.v13-profile-row + .v13-profile-row {
  border-top: 1px solid var(--line);
}

.v13-profile-row span {
  color: var(--muted);
  font-size: 12px;
}

.v13-profile-row strong {
  color: var(--text);
  font-size: 13px;
  text-align: right;
}

.v13-profile-target {
  margin-top: 12px;
  padding: 20px;
  border-radius: 18px;
  background: var(--green-100);
}

.v13-profile-target strong {
  display: block;
  margin-top: 7px;
  color: var(--green-900);
  font-size: 26px;
}

.v13-profile-target p {
  margin: 6px 0 0;
  color: #577168;
  font-size: 11px;
  line-height: 1.5;
}

.v13-profile-logout {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #8f3d38;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.v13-empty-card {
  display: grid;
  justify-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.v13-empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  color: var(--green-900);
  background: var(--green-100);
}

.v13-empty-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  letter-spacing: -.025em;
}

.v13-empty-card p {
  max-width: 520px;
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.v13-shell-primary {
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: var(--green-900);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

/* Existing screens: keep their logic, remove the older warm/lifestyle visual weight. */
body.v13-app-active #recipesScreen,
body.v13-app-active #mealPlan,
body.v13-app-active #shoppingList {
  width: min(100%, 880px);
  margin: 0 auto;
}

body.v13-app-active .hero,
body.v13-app-active .controls,
body.v13-app-active .recipe-library-home,
body.v13-app-active .recipe-browse-view,
body.v13-app-active .meal-plan,
body.v13-app-active .shopping-list {
  box-shadow: none !important;
}

body.v13-app-active .hero {
  border-color: var(--line) !important;
  background: #ffffff !important;
}

body.v13-app-active .controls {
  border-color: var(--line) !important;
  background: #ffffff !important;
}

body.v13-app-active .bottom-nav {
  grid-template-columns: repeat(5, 1fr);
  width: min(540px, calc(100% - 24px));
  bottom: calc(10px + env(safe-area-inset-bottom));
  padding: 6px 5px;
  border: 1px solid rgba(220, 228, 224, .92);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 38px rgba(18, 44, 35, .10);
  backdrop-filter: blur(18px);
}

body.v13-app-active .nav-item {
  gap: 4px;
  min-width: 0;
  min-height: 55px;
  padding: 7px 3px 5px;
  border-radius: 15px;
  color: #89938f;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

body.v13-app-active .nav-item.active {
  color: var(--green-900);
  background: transparent;
}

body.v13-app-active .nav-item:disabled {
  opacity: .45;
}

body.v13-app-active .nav-icon {
  display: grid;
  place-items: center;
  height: 23px;
  font-size: 0;
}

body.v13-app-active .nav-icon svg {
  width: 21px;
  height: 21px;
}

body.v13-app-active .nav-item.active .nav-icon {
  position: relative;
}

body.v13-app-active .nav-item.active .nav-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--green-900);
}

@media (max-width: 620px) {
  body.v13-app-active .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.v13-app-active .topbar {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  body.v13-app-active main {
    padding-top: 12px;
  }

  .v13-page-head {
    padding-top: 18px;
  }

  .v13-target-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .v13-target-macros {
    justify-content: flex-start;
  }

  body.v13-app-active .bottom-nav {
    width: calc(100% - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.v13-app-active .v13-screen {
    animation: none;
  }
}
/* === NUTRATION_V13_STAGE1D_RECIPES_FAVORITES === */
body.v13-app-active .recipe-library-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
body.v13-app-active .v13-favorites-filter{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 14px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--text);font:inherit;font-size:12px;font-weight:750;cursor:pointer}
body.v13-app-active .v13-favorites-filter svg,body.v13-app-active .v13-favorite-button svg,body.v13-app-active .v13-add-plan-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.v13-app-active .v13-favorites-filter b{display:grid;place-items:center;min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:var(--green-100);color:var(--green-900);font-size:10px}
body.v13-app-active .recipe-grid,body.v13-app-active .recipe-preview-grid{gap:14px}
body.v13-app-active .v13-recipe-card{position:relative;overflow:hidden;padding:0!important;border:1px solid var(--line)!important;border-radius:18px!important;background:#fff!important;box-shadow:none!important}
body.v13-app-active .v13-recipe-card::after{display:none!important}
body.v13-app-active .v13-recipe-card-open{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
body.v13-app-active .v13-recipe-card .recipe-card-media{height:178px;margin:0;border-radius:0;background:var(--surface-soft)}
body.v13-app-active .v13-recipe-card-body{padding:15px 15px 16px}
body.v13-app-active .v13-recipe-card-category{margin-bottom:7px;color:var(--green-900);font-size:9px;font-weight:800;letter-spacing:.10em;text-transform:uppercase}
body.v13-app-active .v13-recipe-card h3{min-height:0;margin:0;color:var(--text);font-size:17px;line-height:1.18;letter-spacing:-.025em}
body.v13-app-active .v13-recipe-card-description{display:-webkit-box;overflow:hidden;min-height:37px;margin:7px 0 12px;color:var(--muted);font-size:11px;line-height:1.55;-webkit-line-clamp:2;-webkit-box-orient:vertical}
body.v13-app-active .v13-recipe-card-metrics{display:flex;flex-wrap:wrap;gap:6px}
body.v13-app-active .v13-recipe-card-metrics span{padding:5px 8px;border-radius:999px;background:var(--surface-soft);color:#65736e;font-size:9px;font-weight:700}
body.v13-app-active .v13-recipe-card-macros{display:flex;gap:14px;margin-top:11px;color:var(--muted);font-size:9px}
body.v13-app-active .v13-recipe-card-macros b{color:var(--text);font-size:10px}
body.v13-app-active .v13-recipe-card-actions{position:absolute;top:10px;right:10px;display:flex;gap:7px;z-index:3}
body.v13-app-active .v13-favorite-button,body.v13-app-active .v13-add-plan-button.is-compact{display:grid;place-items:center;width:38px;height:38px;padding:0;border:1px solid rgba(223,231,227,.95);border-radius:12px;background:rgba(255,255,255,.94);color:#67736f;box-shadow:0 5px 16px rgba(17,40,32,.06);backdrop-filter:blur(10px);cursor:pointer}
body.v13-app-active .v13-favorite-button.is-favorite{color:#b84b56}
body.v13-app-active .v13-add-plan-button:disabled{opacity:.45;cursor:not-allowed}
body.v13-app-active .recipe-dialog{width:min(820px,calc(100% - 18px));max-height:min(900px,calc(100dvh - 18px));border-radius:24px;background:#fff}
body.v13-app-active .recipe-dialog .dialog-shell{background:#fff}
body.v13-app-active .v13-detail-topline{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:15px}
body.v13-app-active .v13-detail-topline .detail-category{margin:0}
body.v13-app-active .v13-detail-favorite{position:static;flex:0 0 auto;box-shadow:none;background:var(--surface-soft)}
body.v13-app-active .v13-detail-actions{display:flex;gap:10px;margin:18px 0 4px}
body.v13-app-active .v13-add-plan-button:not(.is-compact){display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 17px;border:0;border-radius:13px;background:var(--green-900);color:#fff;font:inherit;font-size:12px;font-weight:780;cursor:pointer}
body.v13-app-active .v13-add-plan-button:not(.is-compact):disabled{background:#e8eeeb;color:#82908a}
body.v13-app-active .v13-detail-summary{grid-template-columns:repeat(3,1fr);margin-top:18px}
body.v13-app-active .v13-detail-portions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 22px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}
body.v13-app-active .v13-detail-portions>span{color:var(--text);font-size:12px;font-weight:750}
body.v13-app-active .v13-detail-portions>div{display:grid;grid-template-columns:34px 46px 34px;align-items:center;gap:5px}
body.v13-app-active .v13-detail-portions button{width:34px;height:34px;border:1px solid var(--line);border-radius:10px;background:var(--green-100);color:var(--green-900);font:inherit;font-size:18px;font-weight:700;cursor:pointer}
body.v13-app-active .v13-detail-portions strong{text-align:center;color:var(--text);font-size:14px}
body.v13-app-active .v13-detail-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px}
body.v13-app-active .v13-detail-section-heading h3{margin-bottom:0}
body.v13-app-active .v13-detail-section-heading>span{color:var(--muted);font-size:9px;font-weight:700}
body.v13-app-active .v13-nutrition-section .detail-nutrition{margin-top:14px}
body.v13-app-active .ingredient-row{align-items:start}
body.v13-app-active .ingredient-row>span{display:grid;gap:3px}
body.v13-app-active .ingredient-row small,body.v13-app-active .v13-step-time{color:var(--muted);font-size:9px}
body.v13-app-active .ingredient-row strong{color:var(--text);font-size:12px;white-space:nowrap}
body.v13-app-active .v13-detail-footnote{padding:14px 15px;border-radius:13px;background:var(--surface-soft);color:var(--muted);font-size:10px;line-height:1.55}
body.v13-app-active .v13-favorites-empty{grid-column:1/-1;display:grid;justify-items:center;padding:44px 20px;text-align:center}
body.v13-app-active .v13-favorites-empty>span{display:grid;place-items:center;width:48px;height:48px;margin-bottom:13px;border-radius:15px;background:var(--green-100);color:var(--green-900)}
body.v13-app-active .v13-favorites-empty svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6}
body.v13-app-active .v13-favorites-empty h3{margin:0;font-size:18px}
body.v13-app-active .v13-favorites-empty p{margin:7px 0 0;color:var(--muted);font-size:11px}
.v13-recipe-toast{position:fixed;z-index:9999;left:50%;bottom:calc(86px + env(safe-area-inset-bottom));transform:translate(-50%,15px);max-width:min(420px,calc(100% - 28px));padding:11px 15px;border-radius:12px;background:#163d32;color:#fff;box-shadow:0 12px 38px rgba(18,44,35,.18);font-size:11px;font-weight:700;opacity:0;pointer-events:none;transition:opacity .18s ease,transform .18s ease}
.v13-recipe-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.v13-recipe-toast.is-error{background:#7d3935}
@media(max-width:620px){body.v13-app-active .recipe-library-controls{grid-template-columns:1fr}body.v13-app-active .v13-favorites-filter{justify-content:center}body.v13-app-active .v13-recipe-card .recipe-card-media{height:166px}body.v13-app-active .v13-detail-actions .v13-add-plan-button{width:100%}}
/* === /NUTRATION_V13_STAGE1D_RECIPES_FAVORITES === */

/* === NUTRATION_V13_CANONICAL_UI === */
html.v13-app-shell-active,
body.v13-canonical-ui {
  background: #ffffff !important;
}

body.v13-canonical-ui {
  min-height: 100dvh;
  overflow-x: hidden;
}

body.v13-canonical-ui .v13-canonical-shell {
  width: min(960px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  background: #ffffff;
}

body.v13-canonical-ui .v13-canonical-header {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 20px 8px;
  background: #ffffff;
}

body.v13-canonical-ui .v13-canonical-brand {
  color: var(--green-900);
  font-size: 18px;
  font-weight: 820;
  letter-spacing: -.035em;
}

body.v13-canonical-ui main {
  min-height: calc(100dvh - 140px);
}

body.v13-canonical-ui .v13-compat-hidden,
body.v13-canonical-ui .v13-compat-inline {
  display: none !important;
}

body.v13-canonical-ui .v13-canonical-boot {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
  padding-top: 36px;
}

body.v13-canonical-ui .v13-canonical-boot span {
  display: block;
  height: 18px;
  border-radius: 999px;
  background: #f1f5f3;
}

body.v13-canonical-ui .v13-canonical-boot span:nth-child(1) { width: 42%; height: 30px; }
body.v13-canonical-ui .v13-canonical-boot span:nth-child(2) { width: 74%; }
body.v13-canonical-ui .v13-canonical-boot span:nth-child(3) { width: 58%; }

body.v13-canonical-ui #recipesScreen,
body.v13-canonical-ui #mealPlan,
body.v13-canonical-ui #shoppingList {
  width: min(100%, 880px);
  margin: 0 auto;
}

body.v13-canonical-ui .v13-recipe-controls {
  margin-bottom: 22px;
}

body.v13-canonical-ui .v13-plan-toolbar,
body.v13-canonical-ui .v13-shopping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}

body.v13-canonical-ui .v13-secondary-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--green-900);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

body.v13-canonical-ui .v13-secondary-button:disabled {
  opacity: .45;
}

body.v13-canonical-ui .topbar,
body.v13-canonical-ui .hero,
body.v13-canonical-ui .brand,
body.v13-canonical-ui .connection-status {
  display: none !important;
}

body.v13-canonical-ui .bottom-nav.v13-canonical-nav {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 620px) {
  body.v13-canonical-ui .v13-canonical-header {
    min-height: 52px;
    padding: 12px 16px 4px;
  }

  body.v13-canonical-ui .v13-canonical-brand {
    font-size: 17px;
  }

  body.v13-canonical-ui .v13-plan-toolbar,
  body.v13-canonical-ui .v13-shopping-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
/* === /NUTRATION_V13_CANONICAL_UI === */


/* === NUTRATION_V13_STAGE1E_WEEKLY_PLAN === */
.v13-plan-no-items {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid #e4ebe7;
  border-radius: 18px;
  background: #fff;
  color: #184739;
}
.v13-plan-no-items strong { font-size: 17px; }
.v13-plan-no-items span {
  color: #708078;
  font-size: 13px;
  line-height: 1.5;
}
.v13-plan-item-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border-top: 1px solid #edf1ef;
}
.v13-serving-control,
.v13-plan-item-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.v13-serving-control > span {
  color: #718078;
  font-size: 11px;
  font-weight: 700;
}
.v13-serving-control strong {
  min-width: 34px;
  text-align: center;
  color: #184739;
  font-size: 12px;
}
.v13-serving-control button,
.v13-plan-item-actions button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #dfe7e3;
  border-radius: 10px;
  background: #fff;
  color: #184739;
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}
.v13-plan-item-actions button { padding: 0 10px; }
.v13-plan-item-actions .danger { color: #9a3e36; }
.plan-component[draggable="true"] { cursor: grab; }
.plan-component[draggable="true"]:active { cursor: grabbing; }
.plan-meal-row.is-drop-target {
  outline: 2px solid #2f7259;
  outline-offset: 3px;
  border-radius: 16px;
}
.v13-plan-move-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
}
.v13-plan-move-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(19, 40, 32, .28);
}
.v13-plan-move-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(78dvh, 720px);
  margin: 0 auto;
  overflow: auto;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -14px 48px rgba(24, 71, 57, .12);
}
.v13-plan-move-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.v13-plan-move-head div { display: grid; gap: 4px; }
.v13-plan-move-head span {
  color: #5f766b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}
.v13-plan-move-head strong { font-size: 17px; }
.v13-plan-move-head > button {
  width: 38px;
  height: 38px;
  border: 1px solid #e0e8e4;
  border-radius: 12px;
  background: #fff;
  font-size: 22px;
}
.v13-plan-move-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.v13-plan-move-grid button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #e1e9e5;
  border-radius: 13px;
  background: #fff;
  color: #184739;
  font: inherit;
  cursor: pointer;
}
.v13-plan-move-grid button:hover {
  border-color: #8eaa9d;
  background: #f8fbf9;
}
.v13-plan-move-grid b { font-size: 12px; }
.v13-plan-move-grid span {
  color: #66786f;
  font-size: 11px;
}
.v13-plan-move-panel > p {
  margin: 14px 2px 0;
  color: #718078;
  font-size: 11px;
  line-height: 1.5;
}
.v13-stage1e-plan-empty { max-width: 620px; }

@media (max-width: 620px) {
  .v13-plan-item-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .v13-serving-control,
  .v13-plan-item-actions {
    justify-content: space-between;
  }
  .v13-plan-item-actions button {
    flex: 1;
    min-height: 40px;
  }
  .v13-plan-move-grid { grid-template-columns: 1fr; }
}
/* === /NUTRATION_V13_STAGE1E_WEEKLY_PLAN === */


/* === NUTRATION_V13_STAGE1F_SHOPPING === */
body.v13-canonical-ui #shoppingList {
  max-width: 860px;
  margin-inline: auto;
}
body.v13-canonical-ui .v13-shopping-toolbar {
  position: sticky;
  top: 10px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 10px 12px;
  border: 1px solid #e2eae6;
  border-radius: 15px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 24px rgba(24,71,57,.05);
  backdrop-filter: blur(12px);
}
body.v13-canonical-ui #shoppingProgress {
  color: #184739;
  font-size: 12px;
  font-weight: 780;
}
body.v13-canonical-ui .shopping-list-content {
  display: grid;
  gap: 18px;
}
body.v13-canonical-ui .v13-shopping-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
body.v13-canonical-ui .v13-shopping-summary > div {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 12px 13px;
  border: 1px solid #e4ebe7;
  border-radius: 15px;
  background: #fff;
}
body.v13-canonical-ui .v13-shopping-summary span {
  color: #73827a;
  font-size: 10px;
  font-weight: 700;
}
body.v13-canonical-ui .v13-shopping-summary strong {
  color: #184739;
  font-size: 21px;
  line-height: 1;
}
body.v13-canonical-ui .shopping-pantry-intro {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid #dfe9e4;
  border-radius: 16px;
  background: #f8fbf9;
  color: #60736a;
  box-shadow: none;
}
body.v13-canonical-ui .shopping-pantry-intro strong {
  color: #184739;
  font-size: 13px;
}
body.v13-canonical-ui .shopping-pantry-intro span {
  font-size: 11px;
  line-height: 1.5;
}
body.v13-canonical-ui .shopping-department {
  display: grid;
  gap: 8px;
}
body.v13-canonical-ui .shopping-department-heading {
  padding: 0 3px;
}
body.v13-canonical-ui .shopping-department-heading h3 {
  color: #184739;
  font-size: 13px;
}
body.v13-canonical-ui .shopping-department-heading span {
  color: #7a8881;
  font-size: 10px;
}
body.v13-canonical-ui .shopping-department-items {
  display: grid;
  gap: 7px;
}
body.v13-canonical-ui .shopping-item {
  border: 1px solid #e4ebe7;
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
}
body.v13-canonical-ui .shopping-item:hover {
  border-color: #cad9d1;
}
body.v13-canonical-ui .shopping-item.pantry-covered {
  border-color: #dce8e2;
  background: #f8fbf9;
}
body.v13-canonical-ui .shopping-home-check {
  background: #e8f3ed;
  color: #2f7259;
}
body.v13-canonical-ui .shopping-buy-quantity {
  color: #2f7259;
  font-size: 12px;
}
body.v13-canonical-ui .shopping-quantity-breakdown {
  color: #75827c;
  font-size: 10px;
}
body.v13-canonical-ui .shopping-pantry-editor {
  border-radius: 10px;
  background: #f7faf8;
}
body.v13-canonical-ui .pantry-step-button,
body.v13-canonical-ui .shopping-item .pantry-quantity-input {
  border-color: #dfe8e3;
  background: #fff;
  color: #184739;
}
body.v13-canonical-ui .v13-shopping-empty-inline {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px solid #e1e9e5;
  border-radius: 18px;
  background: #fff;
}
body.v13-canonical-ui .v13-shopping-empty-inline strong {
  color: #184739;
  font-size: 16px;
}
body.v13-canonical-ui .v13-shopping-empty-inline span {
  max-width: 580px;
  color: #718078;
  font-size: 12px;
  line-height: 1.55;
}
body.v13-canonical-ui .v13-shopping-empty-inline button {
  min-height: 42px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: #184739;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}
body.v13-canonical-ui .v13-shopping-loading {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 36px 0;
}
body.v13-canonical-ui .v13-shopping-loading span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ba79a;
  animation: v13-shopping-pulse 900ms infinite alternate;
}
body.v13-canonical-ui .v13-shopping-loading span:nth-child(2) { animation-delay: 150ms; }
body.v13-canonical-ui .v13-shopping-loading span:nth-child(3) { animation-delay: 300ms; }
@keyframes v13-shopping-pulse {
  to { opacity: .25; transform: translateY(-3px); }
}
@media (max-width: 620px) {
  body.v13-canonical-ui .v13-shopping-toolbar {
    top: 6px;
  }
  body.v13-canonical-ui .shopping-item-with-pantry {
    grid-template-columns: 24px minmax(0,1fr);
    gap: 9px;
    padding: 13px;
  }
  body.v13-canonical-ui .shopping-buy-quantity {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
  body.v13-canonical-ui .shopping-quantity-breakdown {
    align-items: flex-start;
  }
  body.v13-canonical-ui .shopping-pantry-editor {
    width: 100%;
    justify-content: space-between;
  }
  body.v13-canonical-ui .v13-shopping-summary > div {
    min-height: 64px;
    padding: 10px;
  }
}
/* === /NUTRATION_V13_STAGE1F_SHOPPING === */

/* NUTRATION_V13_RECIPE_CARD_BOTTOM_ALIGN
   Keep metrics and macros on the same baseline across cards with different title/description lengths. */
body.v13-app-active .v13-recipe-card{height:100%}
body.v13-app-active .v13-recipe-card-open{display:flex;height:100%;flex-direction:column}
body.v13-app-active .v13-recipe-card-body{display:flex;flex:1;flex-direction:column;width:100%;box-sizing:border-box}
body.v13-app-active .v13-recipe-card-metrics{margin-top:auto}

/* === NUTRATION_V13_RECIPE_HERO_CARDS === */
body.v13-app-active .recipe-grid,
body.v13-app-active .recipe-preview-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));
  gap:18px;
  align-items:stretch;
}
body.v13-app-active .v13-recipe-card{
  border-color:#e1e9e5!important;
  border-radius:24px!important;
  box-shadow:0 12px 34px rgba(20,66,51,.075)!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
body.v13-app-active .v13-recipe-card:hover{
  transform:translateY(-2px);
  border-color:#cadbd3!important;
  box-shadow:0 17px 42px rgba(20,66,51,.11)!important;
}
body.v13-app-active .v13-recipe-card .recipe-card-media{
  width:100%;
  height:auto;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#edf3ef;
}
body.v13-app-active .v13-recipe-card .recipe-card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}
body.v13-app-active .v13-recipe-card:hover .recipe-card-media img{transform:scale(1.018)}
body.v13-app-active .v13-recipe-card-body{padding:19px 18px 18px}
body.v13-app-active .v13-recipe-card-category{
  margin-bottom:8px;
  color:#276b56;
  font-size:10px;
  letter-spacing:.12em;
}
body.v13-app-active .v13-recipe-card h3{
  color:#164b3c;
  font-size:22px;
  line-height:1.15;
  letter-spacing:-.035em;
}
body.v13-app-active .v13-recipe-card-description{
  min-height:58px;
  margin:9px 0 15px;
  color:#61716b;
  font-size:14px;
  line-height:1.45;
  -webkit-line-clamp:3;
}
body.v13-app-active .v13-recipe-card-metrics,
body.v13-app-active .v13-detail-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  width:100%;
  padding:12px 0;
  border-top:1px solid #e7eeea;
  border-bottom:1px solid #e7eeea;
}
body.v13-app-active .v13-recipe-metric{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  gap:5px;
  padding:0 7px;
  color:#66746f;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}
body.v13-app-active .v13-recipe-metric+ .v13-recipe-metric{border-left:1px solid #e7eeea}
body.v13-app-active .v13-recipe-metric svg{
  width:18px;
  height:18px;
  flex:0 0 18px;
  fill:none;
  stroke:#55726a;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
body.v13-app-active .v13-recipe-metric b{
  overflow:hidden;
  color:#324c44;
  font-size:12px;
  font-weight:760;
  text-overflow:ellipsis;
}
body.v13-app-active .v13-recipe-metric small{font-size:10px}
body.v13-app-active .v13-recipe-card-nutrition{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-top:14px;
}
body.v13-app-active .v13-recipe-nutrient{
  display:grid;
  justify-items:center;
  align-content:center;
  min-width:0;
  min-height:68px;
  padding:8px 3px;
  border-radius:12px;
  color:#375048;
  text-align:center;
}
body.v13-app-active .v13-recipe-nutrient span{
  overflow:hidden;
  width:100%;
  font-size:9px;
  line-height:1.1;
  text-overflow:ellipsis;
}
body.v13-app-active .v13-recipe-nutrient strong{
  margin-top:4px;
  color:#153f34;
  font-size:16px;
  line-height:1;
}
body.v13-app-active .v13-recipe-nutrient small{margin-top:2px;font-size:9px}
body.v13-app-active .v13-recipe-nutrient.is-energy{background:#e4f4eb}
body.v13-app-active .v13-recipe-nutrient.is-protein{background:#fae8e9}
body.v13-app-active .v13-recipe-nutrient.is-fat{background:#fbf1da}
body.v13-app-active .v13-recipe-nutrient.is-carbs{background:#e3f1fb}
body.v13-app-active .v13-recipe-nutrient.is-fiber{background:#eeebfa}
body.v13-app-active .v13-recipe-card-actions{top:13px;right:13px;gap:8px}
body.v13-app-active .v13-favorite-button,
body.v13-app-active .v13-add-plan-button.is-compact{
  width:42px;
  height:42px;
  border-radius:13px;
  box-shadow:0 7px 22px rgba(18,54,43,.13);
}

body.v13-app-active .recipe-dialog{
  width:min(940px,calc(100% - 24px));
  max-height:min(940px,calc(100dvh - 24px));
  border-radius:28px;
}
body.v13-app-active .v13-detail-shell{padding-bottom:8px}
body.v13-app-active .recipe-detail-hero{
  width:100%;
  height:auto;
  aspect-ratio:16/8.2;
  overflow:hidden;
  border-radius:20px;
  background:#edf3ef;
}
body.v13-app-active .recipe-detail-hero img{width:100%;height:100%;object-fit:cover}
body.v13-app-active .v13-detail-shell h2{
  max-width:760px;
  margin:10px 0 0;
  color:#164b3c;
  font-size:clamp(28px,4.3vw,42px);
  line-height:1.04;
  letter-spacing:-.045em;
}
body.v13-app-active .v13-detail-shell .detail-description{
  max-width:720px;
  margin:12px 0 0;
  color:#60706a;
  font-size:16px;
  line-height:1.55;
}
body.v13-app-active .v13-detail-summary{margin-top:20px;padding:15px 0}
body.v13-app-active .v13-detail-summary .v13-recipe-metric{font-size:13px}
body.v13-app-active .v13-detail-summary .v13-recipe-metric svg{width:21px;height:21px;flex-basis:21px}
body.v13-app-active .v13-detail-summary .v13-recipe-metric b{font-size:14px}
body.v13-app-active .v13-nutrition-section .detail-nutrition{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
}
body.v13-app-active .v13-nutrition-section .detail-nutrient{
  display:grid;
  justify-items:center;
  align-content:center;
  min-height:92px;
  padding:12px 8px;
  border:0;
  border-radius:15px;
  background:#e4f4eb;
  text-align:center;
}
body.v13-app-active .v13-nutrition-section .detail-nutrient:nth-child(2){background:#fae8e9}
body.v13-app-active .v13-nutrition-section .detail-nutrient:nth-child(3){background:#fbf1da}
body.v13-app-active .v13-nutrition-section .detail-nutrient:nth-child(4){background:#e3f1fb}
body.v13-app-active .v13-nutrition-section .detail-nutrient:nth-child(5){background:#eeebfa}
body.v13-app-active .v13-nutrition-section .detail-nutrient strong{color:#153f34;font-size:24px}
body.v13-app-active .v13-nutrition-section .detail-nutrient span{color:#466159;font-size:10px}
body.v13-app-active .v13-steps-section .step-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin:15px 0 0;
  padding:0;
  list-style:none;
}
body.v13-app-active .v13-steps-section .step-row{
  position:relative;
  display:flex;
  min-width:0;
  flex-direction:column;
  overflow:hidden;
  padding:0;
  border:1px solid #e1e9e5;
  border-radius:17px;
  background:#fff;
}
body.v13-app-active .v13-steps-section .recipe-step-media{
  order:0;
  width:100%;
  height:auto;
  aspect-ratio:4/3;
  margin:0;
  overflow:hidden;
  border-radius:0;
  background:#edf3ef;
}
body.v13-app-active .v13-steps-section .recipe-step-media img{width:100%;height:100%;object-fit:cover}
body.v13-app-active .v13-steps-section .step-number{
  position:absolute;
  top:10px;
  left:10px;
  z-index:2;
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border:2px solid rgba(255,255,255,.9);
  border-radius:999px;
  background:#165442;
  color:#fff;
  font-size:13px;
  font-weight:800;
  box-shadow:0 5px 14px rgba(12,51,39,.22);
}
body.v13-app-active .v13-steps-section .step-content{
  display:grid;
  align-content:start;
  gap:6px;
  padding:12px 13px 14px;
}
body.v13-app-active .v13-steps-section .v13-step-label{
  color:#2d6d59;
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
body.v13-app-active .v13-steps-section .step-content p{
  display:-webkit-box;
  overflow:hidden;
  margin:0;
  color:#294139;
  font-size:13px;
  line-height:1.42;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
body.v13-app-active .v13-steps-section .v13-step-tip{
  color:#75817d;
  font-size:10px;
  line-height:1.4;
}

@media(max-width:620px){
  body.v13-app-active .recipe-grid,
  body.v13-app-active .recipe-preview-grid{grid-template-columns:1fr;gap:16px}
  body.v13-app-active .v13-recipe-card .recipe-card-media{aspect-ratio:16/9}
  body.v13-app-active .v13-recipe-card-body{padding:18px 16px 17px}
  body.v13-app-active .v13-recipe-card h3{font-size:22px}
  body.v13-app-active .v13-recipe-card-description{min-height:0;font-size:14px}
  body.v13-app-active .v13-recipe-metric{gap:4px;padding:0 4px;font-size:10px}
  body.v13-app-active .v13-recipe-metric svg{width:17px;height:17px;flex-basis:17px}
  body.v13-app-active .v13-recipe-metric b{font-size:11px}
  body.v13-app-active .v13-recipe-nutrient{min-height:64px;border-radius:11px}
  body.v13-app-active .v13-recipe-nutrient span{font-size:8px}
  body.v13-app-active .v13-recipe-nutrient strong{font-size:15px}
  body.v13-app-active .recipe-dialog{width:100%;max-width:none;max-height:100dvh;margin:0;border-radius:0}
  body.v13-app-active .recipe-detail-hero{aspect-ratio:16/10;border-radius:16px}
  body.v13-app-active .v13-detail-shell h2{font-size:29px;line-height:1.08}
  body.v13-app-active .v13-detail-shell .detail-description{font-size:15px}
  body.v13-app-active .v13-detail-summary{padding:13px 0}
  body.v13-app-active .v13-detail-summary .v13-recipe-metric{font-size:11px}
  body.v13-app-active .v13-detail-summary .v13-recipe-metric svg{width:18px;height:18px;flex-basis:18px}
  body.v13-app-active .v13-detail-summary .v13-recipe-metric b{font-size:12px}
  body.v13-app-active .v13-nutrition-section .detail-nutrition{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
  body.v13-app-active .v13-nutrition-section .detail-nutrient{min-height:76px;padding:8px 3px;border-radius:11px}
  body.v13-app-active .v13-nutrition-section .detail-nutrient strong{font-size:18px}
  body.v13-app-active .v13-nutrition-section .detail-nutrient span{font-size:8px}
  body.v13-app-active .v13-steps-section .step-list{grid-template-columns:1fr;gap:11px}
  body.v13-app-active .v13-steps-section .step-row{display:grid;grid-template-columns:minmax(112px,40%) minmax(0,1fr)}
  body.v13-app-active .v13-steps-section .recipe-step-media{grid-column:1;aspect-ratio:1/1;height:100%}
  body.v13-app-active .v13-steps-section .step-content{grid-column:2;padding:13px 12px}
  body.v13-app-active .v13-steps-section .step-content p{-webkit-line-clamp:4;font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  body.v13-app-active .v13-recipe-card,
  body.v13-app-active .v13-recipe-card .recipe-card-media img{transition:none}
}
/* === /NUTRATION_V13_RECIPE_HERO_CARDS === */
