/* ============================================================
   MEAL PLANNER V6 — CALM KITCHEN COMMAND CENTER
============================================================ */

:root {
  --bg: #f2f6f5;
  --card: #ffffff;
  --text: #14231f;
  --muted: #64736f;
  --border: #dce6e2;
  --primary: #176b57;
  --primary-dark: #105746;
  --primary-soft: #e2f4ee;
  --green: #16805f;
  --green-light: #def5e9;
  --yellow: #9c6810;
  --yellow-light: #fff1cc;
  --red: #ba3d38;
  --red-light: #fee8e5;
  --purple: #5267ad;
  --orange: #c86c24;
  --orange-light: #fff0df;
  --accent: #f1a331;
  --accent-dark: #b86318;
  --soft-bg: #f6f9f8;
  --input-bg: #ffffff;
  --menu-bg: #ffffff;
  --shadow: 0 1px 2px rgba(11, 42, 34, .04), 0 10px 30px rgba(11, 42, 34, .06);
  --shadow-large: 0 24px 70px rgba(7, 27, 22, .22);
  --radius: 18px;
  --radius-small: 12px;
  --header-height: 76px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c1512;
  --card: #14201c;
  --text: #f2f7f5;
  --muted: #9aa9a4;
  --border: #2a3a35;
  --primary: #58c8a4;
  --primary-dark: #3bad89;
  --primary-soft: #193a31;
  --green: #61d1a5;
  --green-light: #17372d;
  --yellow: #f2bd58;
  --yellow-light: #3a2e17;
  --red: #ff8b82;
  --red-light: #40201e;
  --purple: #9aabe8;
  --orange: #f5a35e;
  --orange-light: #402a18;
  --accent: #f6b34f;
  --accent-dark: #dc8832;
  --soft-bg: #101a17;
  --input-bg: #101a17;
  --menu-bg: #14201c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 14px 34px rgba(0, 0, 0, .16);
  --shadow-large: 0 24px 80px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0c1512;
    --card: #14201c;
    --text: #f2f7f5;
    --muted: #9aa9a4;
    --border: #2a3a35;
    --primary: #58c8a4;
    --primary-dark: #3bad89;
    --primary-soft: #193a31;
    --green: #61d1a5;
    --green-light: #17372d;
    --yellow: #f2bd58;
    --yellow-light: #3a2e17;
    --red: #ff8b82;
    --red-light: #40201e;
    --purple: #9aabe8;
    --orange: #f5a35e;
    --orange-light: #402a18;
    --accent: #f6b34f;
    --accent-dark: #dc8832;
    --soft-bg: #101a17;
    --input-bg: #101a17;
    --menu-bg: #14201c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 14px 34px rgba(0, 0, 0, .16);
    --shadow-large: 0 24px 80px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -10%, rgba(31, 141, 112, .08), transparent 29rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 38%, transparent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  color: inherit;
  letter-spacing: -.025em;
}

/* App header */

.app-banner {
  position: sticky !important;
  top: 0;
  z-index: 90;
  min-height: var(--header-height);
  padding: 12px max(22px, calc((100vw - 1220px) / 2)) !important;
  gap: 18px;
  overflow: visible !important;
  background:
    radial-gradient(circle at 14% -30%, rgba(255, 255, 255, .18), transparent 18rem),
    linear-gradient(112deg, #102c27 0%, #17483d 58%, #1c5749 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 10px 30px rgba(9, 35, 29, .14) !important;
}

.app-banner::after {
  height: 2px !important;
  background: linear-gradient(90deg, transparent 4%, #62d0aa 32%, #f2ad43 72%, transparent 96%) !important;
  opacity: .85;
}

.banner-copy {
  flex: 1;
  gap: 12px !important;
}

.banner-mark {
  width: 48px !important;
  height: 48px !important;
  border-radius: 15px !important;
  background: rgba(255, 255, 255, .1) !important;
  border-color: rgba(255, 255, 255, .16) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.banner-mark svg {
  width: 34px !important;
  height: 34px !important;
}

.brand-copy {
  min-width: 0;
}

.brand-eyebrow {
  margin-bottom: 1px;
  color: #b8ddd2;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.1;
  text-transform: uppercase;
}

.app-banner h1 {
  color: #ffffff;
  font-size: 1.38rem !important;
  font-weight: 780;
  line-height: 1.18;
}

.app-banner .small {
  margin-top: 1px !important;
  color: rgba(255, 255, 255, .68) !important;
  font-size: .78rem;
}

.banner-actions {
  gap: 8px !important;
}

.header-icon-button,
.hamburger-button,
.active-user-pill,
.sync-status-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, .15) !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #ffffff !important;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-icon-button:hover,
.hamburger-button:hover,
.active-user-pill:hover,
.sync-status-button:hover {
  background: rgba(255, 255, 255, .16) !important;
}

.header-icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 13px;
}

.header-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.sync-status-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
  padding: 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.sync-status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #d8e2df;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}

.sync-status-dot[data-sync-mode="synced"] {
  background: #6ce0b4;
}

.sync-status-dot[data-sync-mode="syncing"] {
  background: #f5bd63;
  animation: mp6Pulse 1.2s ease-in-out infinite;
}

.sync-status-dot[data-sync-mode="offline"],
.sync-status-dot[data-sync-mode="locked"] {
  background: #ffbe5d;
}

.sync-status-dot[data-sync-mode="error"] {
  background: #ff8881;
}

.sync {
  max-width: 110px;
  overflow: hidden;
  color: rgba(255, 255, 255, .88) !important;
  font-size: .76rem !important;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
}

.active-user-pill {
  padding: 6px 10px 6px 6px !important;
}

.active-user-pill .user-avatar {
  width: 31px;
  height: 31px;
  background: rgba(255, 255, 255, .17);
}

.active-user-pill #activeUserName {
  line-height: 1.05;
}

.active-household-name {
  max-width: 110px;
  overflow: hidden;
  color: rgba(255, 255, 255, .62) !important;
  font-size: .66rem !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hamburger-button {
  border-radius: 13px !important;
}

/* Navigation */

#primaryNav {
  position: sticky;
  top: var(--header-height);
  z-index: 70;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  width: 100%;
  padding: 0 max(14px, calc((100vw - 1000px) / 2)) !important;
  gap: 4px !important;
  overflow: visible !important;
  background: color-mix(in srgb, var(--card) 92%, transparent) !important;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(11, 42, 34, .045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#primaryNav .nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px !important;
  border: 0;
  border-bottom: 2px solid transparent !important;
  background: transparent;
  color: var(--muted);
  font-size: .88rem !important;
  font-weight: 720;
  letter-spacing: 0 !important;
}

#primaryNav .nav-btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#primaryNav .nav-btn:hover {
  color: var(--text);
}

#primaryNav .nav-btn.active {
  color: var(--primary) !important;
  border-bottom-color: var(--primary) !important;
}

.global-search-shell {
  display: none !important;
}

/* Main product surface */

#appMain {
  width: min(100%, 1260px);
  max-width: 1260px;
  margin: 0 auto;
  padding: 30px 24px 96px;
}

.page {
  animation: mp6PageIn .22s ease both;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 22px;
}

.page-heading h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  font-weight: 790;
  line-height: 1.08;
}

.page-heading p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: .96rem;
}

.page-kicker,
.section-eyebrow,
.modal-kicker {
  display: block;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .085em;
  line-height: 1.2;
  text-transform: uppercase;
}

.surface,
.card,
.dashboard-card,
.favorites-panel {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--card) !important;
  color: var(--text);
  box-shadow: var(--shadow) !important;
}

.card {
  padding: 18px;
}

.content-section {
  margin-top: 28px;
}

.content-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.content-section-heading h3 {
  margin: 2px 0 0;
  font-size: 1.38rem;
}

.results-meta {
  min-height: 28px;
  padding: 10px 2px 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}

/* Buttons and form controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  gap: 7px;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  font-size: .9rem;
  font-weight: 760;
  line-height: 1.2;
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease;
}

.btn:active {
  transform: scale(.975);
}

.btn-primary,
html[data-theme="dark"] .btn-primary {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover,
html[data-theme="dark"] .btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-secondary,
.btn-light,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.btn-secondary:hover,
.btn-light:hover {
  background: var(--soft-bg) !important;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border)) !important;
}

.btn-accent,
.btn-orange,
html[data-theme="dark"] .btn-accent,
html[data-theme="dark"] .btn-orange {
  background: var(--accent) !important;
  color: #2d1a05 !important;
  border-color: var(--accent) !important;
}

.btn-purple,
html[data-theme="dark"] .btn-purple {
  background: #5067a8 !important;
  color: #ffffff !important;
  border-color: #5067a8 !important;
}

.btn-green,
html[data-theme="dark"] .btn-green {
  background: var(--green) !important;
  color: #ffffff !important;
  border-color: var(--green) !important;
}

.btn-red,
html[data-theme="dark"] .btn-red {
  background: var(--red) !important;
  color: #ffffff !important;
  border-color: var(--red) !important;
}

.btn-quiet {
  background: transparent !important;
  color: var(--muted) !important;
  border-color: transparent !important;
}

.btn-danger-quiet {
  background: transparent !important;
  color: var(--red) !important;
  border-color: transparent !important;
}

.btn-glass {
  background: rgba(255, 255, 255, .14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, .24) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-large {
  min-height: 48px;
  padding: 12px 18px;
  font-size: .96rem;
}

.full-width {
  width: 100%;
}

.text-button {
  min-height: 38px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: .88rem;
  font-weight: 780;
}

.icon-button,
.row-more-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  color: var(--muted);
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border) !important;
  border-radius: 11px !important;
  background: var(--input-bg) !important;
  color: var(--text) !important;
  font-size: 1rem;
  box-shadow: 0 1px 1px rgba(11, 42, 34, .02);
}

textarea {
  min-height: 110px;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

label {
  color: var(--text);
  font-size: .84rem;
  font-weight: 730;
}

.search-field {
  position: relative;
  min-width: 240px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.search-field input {
  padding-left: 42px;
}

.button-row {
  gap: 9px;
}

.badge {
  padding: 5px 9px;
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .01em;
}

.badge-green {
  background: var(--green-light) !important;
  color: color-mix(in srgb, var(--green) 82%, var(--text)) !important;
}

.badge-yellow {
  background: var(--yellow-light) !important;
  color: var(--yellow) !important;
}

.badge-red {
  background: var(--red-light) !important;
  color: var(--red) !important;
}

.badge-purple {
  background: color-mix(in srgb, var(--purple) 15%, var(--card)) !important;
  color: var(--purple) !important;
}

/* Kitchen overview */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.overview-card {
  position: relative;
  min-width: 0;
  min-height: 108px;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}

.overview-card::after {
  position: absolute;
  top: -18px;
  right: -12px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  opacity: .055;
}

.overview-card:hover {
  border-color: color-mix(in srgb, currentColor 28%, var(--border));
  transform: translateY(-1px);
}

.overview-card .overview-label,
.overview-card .overview-detail {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-card strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 1.55rem;
  font-weight: 790;
  line-height: 1;
}

.overview-card.tone-plan {
  color: var(--primary);
}

.overview-card.tone-shop {
  color: #4a65ad;
}

.overview-card.tone-soon {
  color: #b46919;
}

.overview-card.tone-low {
  color: var(--red);
}

.overview-card .overview-label,
.overview-card .overview-detail {
  color: var(--muted);
}

/* Tonight */

.v6-tonight-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  background-color: #17362f;
  background-image: var(--card-image);
  background-position: center;
  background-size: cover;
  color: #ffffff;
  box-shadow: 0 22px 55px rgba(11, 42, 34, .18);
  isolation: isolate;
}

.v6-tonight-hero.no-image {
  background-image:
    radial-gradient(circle at 76% 22%, rgba(242, 173, 67, .34), transparent 13rem),
    radial-gradient(circle at 20% 20%, rgba(94, 210, 173, .18), transparent 15rem),
    linear-gradient(135deg, #14362f, #1b5144);
}

.v6-tonight-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 18, 14, .88) 0%, rgba(4, 18, 14, .62) 47%, rgba(4, 18, 14, .12) 82%),
    linear-gradient(0deg, rgba(4, 18, 14, .6), transparent 55%);
  content: "";
}

.v6-tonight-overlay {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  padding: 26px;
}

.tonight-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tonight-label {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(13, 48, 39, .55);
  color: #ffffff;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
  backdrop-filter: blur(9px);
}

.readiness-ring {
  --ring-color: #68ddad;
  display: grid;
  width: 76px;
  height: 76px;
  place-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(12, 39, 32, .88) 58%, transparent 60%),
    conic-gradient(var(--ring-color) calc(var(--readiness) * 1%), rgba(255, 255, 255, .2) 0);
  box-shadow: 0 7px 24px rgba(0, 0, 0, .2);
  text-align: center;
}

.readiness-ring.close {
  --ring-color: #f2bd58;
}

.readiness-ring.shop {
  --ring-color: #ff9389;
}

.readiness-ring strong,
.readiness-ring span {
  display: block;
  color: #ffffff;
  line-height: 1;
}

.readiness-ring strong {
  font-size: 1.08rem;
}

.readiness-ring span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .68);
  font-size: .62rem;
  font-weight: 750;
  text-transform: uppercase;
}

.tonight-copy {
  max-width: 720px;
  margin-top: auto;
}

.tonight-copy h3 {
  max-width: 700px;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 820;
  line-height: 1.01;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.tonight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, .84);
  font-size: .91rem;
  font-weight: 650;
}

.selected-sides {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 31px;
  margin-bottom: 17px;
}

.selected-sides .muted {
  color: rgba(255, 255, 255, .58) !important;
}

.selected-sides-label {
  color: rgba(255, 255, 255, .7);
  font-size: .78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.selected-side-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 5px 5px 9px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  font-size: .76rem;
  font-weight: 700;
}

.selected-side-chip button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .2);
  color: #ffffff;
}

.tonight-actions {
  align-items: center;
}

.meal-reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.meal-reason-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .8);
  font-size: .69rem;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.empty-tonight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 190px;
  padding: 26px;
}

.empty-tonight-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 2rem;
}

.empty-tonight h3 {
  margin: 2px 0 5px;
  font-size: 1.45rem;
}

.empty-tonight p {
  margin: 0;
  color: var(--muted);
}

.attention-strip {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  margin-top: 13px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.attention-heading strong,
.attention-heading span {
  display: block;
}

.attention-heading strong {
  font-size: .86rem;
}

.attention-heading span {
  color: var(--muted);
  font-size: .73rem;
}

.attention-items {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.attention-items::-webkit-scrollbar {
  display: none;
}

.attention-items button {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 6px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft-bg);
  color: var(--text);
  font-size: .75rem;
}

.attention-items button span:last-child {
  color: var(--muted);
}

.attention-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}

.attention-dot.low {
  background: var(--red);
}

.quick-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.quick-action-bar > div:first-child strong,
.quick-action-bar > div:first-child span {
  display: block;
}

.quick-action-bar > div:first-child span {
  margin-top: 1px;
  color: var(--muted);
  font-size: .78rem;
}

.tonight-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.smart-idea-card {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.smart-idea-card > img,
.smart-idea-fallback {
  width: 64px;
  height: 64px;
  border-radius: 11px;
  object-fit: cover;
}

.smart-idea-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a5949, #243a55);
  color: rgba(255, 255, 255, .78);
  font-size: .72rem;
  font-weight: 850;
}

.smart-idea-copy {
  min-width: 0;
}

.smart-idea-copy .section-eyebrow {
  margin-bottom: 3px;
  font-size: .61rem;
}

.card-title-button {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: .94rem;
  font-weight: 780;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-idea-meta {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.idea-add-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 650;
}

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

.side-suggestion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 11px 11px 11px 14px;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.side-card-main {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

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

.side-card-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-card-main span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .74rem;
}

.kitchen-strip {
  margin-top: 13px !important;
  border: 1px solid var(--border) !important;
  border-radius: 15px !important;
  background: var(--card) !important;
  box-shadow: var(--shadow);
}

/* Recipes */

.recipe-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.recipe-controls select {
  width: auto;
  min-width: 145px;
}

.recipe-display-toolbar {
  display: inline-flex !important;
  width: auto !important;
  padding: 3px !important;
  gap: 2px !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft-bg);
}

.recipe-view-btn {
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0 !important;
  place-items: center;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: .9rem !important;
}

.recipe-view-btn.active {
  background: var(--card) !important;
  color: var(--primary) !important;
  box-shadow: 0 1px 4px rgba(11, 42, 34, .12);
}

.favorites-section:empty {
  display: none;
}

.favorites-panel {
  padding: 16px !important;
}

.favorites-header {
  margin-bottom: 10px;
}

.favorites-grid {
  display: flex !important;
  gap: 10px !important;
  overflow-x: auto;
  padding: 1px 1px 5px;
  scroll-snap-type: x proximity;
}

.favorite-mini-card {
  min-width: 200px;
  min-height: 132px !important;
  border-radius: 14px !important;
  scroll-snap-align: start;
}

.favorite-mini-content {
  min-height: 132px !important;
}

.recipe-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.meal-card-background {
  min-height: 300px !important;
  border-radius: 18px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow) !important;
  transition: transform .16s ease, box-shadow .16s ease;
}

.meal-card-background:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(11, 42, 34, .13) !important;
}

.meal-card-background::before {
  background: linear-gradient(to top, rgba(3, 15, 12, .9) 0%, rgba(3, 15, 12, .48) 45%, rgba(3, 15, 12, .06) 78%) !important;
}

.meal-card-background .meal-card-overlay-content {
  min-height: 300px !important;
  padding: 17px !important;
}

.meal-card-background .recipe-title {
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  line-height: 1.18;
}

.recipe-card-icon-button,
.favorite-star {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px;
  min-height: 42px;
  border-radius: 13px !important;
  background: rgba(8, 29, 23, .68) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  backdrop-filter: blur(9px);
}

.recipe-card-plus {
  font-size: 1.45rem !important;
}

#recipeGrid.recipe-view-list {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}

#recipeGrid.recipe-view-list > .windows-recipe-row {
  min-height: 58px !important;
  border: 1px solid var(--border) !important;
  border-radius: 13px !important;
  background: var(--card) !important;
  box-shadow: none !important;
}

#recipeGrid.recipe-view-list > .windows-recipe-row .meal-card-overlay-content {
  min-height: 58px !important;
  padding: 8px 9px 8px 14px !important;
}

#recipeGrid.recipe-view-list > .windows-recipe-row .recipe-title {
  color: var(--text) !important;
  font-size: .96rem !important;
  font-weight: 720 !important;
  text-shadow: none !important;
}

#recipeGrid.recipe-view-list > .windows-recipe-row .favorite-star,
#recipeGrid.recipe-view-list > .windows-recipe-row .recipe-card-icon-button {
  position: static !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  background: var(--soft-bg) !important;
  color: var(--primary) !important;
  border-color: var(--border) !important;
}

/* Inventory */

.compact-overview {
  margin-bottom: 14px;
}

.compact-overview .overview-card {
  min-height: 88px;
}

.inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 11px;
  padding: 11px;
}

.inventory-toolbar select {
  width: auto;
  min-width: 160px;
}

.inventory-surface,
.shopping-surface {
  overflow: hidden;
  padding: 4px 17px;
}

.v6-inventory-list {
  display: grid;
}

.v6-inventory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.v6-inventory-row:last-child {
  border-bottom: 0;
}

.inventory-item-main {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 5px 0;
  gap: 11px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.inventory-item-icon {
  width: 8px;
  height: 36px;
  border-radius: 999px;
  background: var(--green);
}

.inventory-item-icon.warning {
  background: var(--yellow);
}

.inventory-item-icon.danger {
  background: var(--red);
}

.inventory-item-copy {
  min-width: 0;
}

.inventory-item-copy strong,
.inventory-item-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-item-copy strong {
  font-size: .94rem;
}

.inventory-item-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .74rem;
}

.status-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.warning {
  background: var(--yellow-light);
  color: var(--yellow);
}

.status-pill.danger {
  background: var(--red-light);
  color: var(--red);
}

.inline-quantity {
  display: grid;
  grid-template-columns: 36px minmax(74px, auto) 36px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft-bg);
}

.inline-quantity > button {
  min-height: 38px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.inline-quantity > button:first-child {
  border-right: 1px solid var(--border);
}

.inline-quantity > button:last-child {
  border-left: 1px solid var(--border);
}

.inline-quantity .quantity-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.inline-quantity .quantity-value strong {
  font-size: .86rem;
}

.inline-quantity .quantity-value span {
  color: var(--muted);
  font-size: .68rem;
}

.inventory-item-detail-grid {
  gap: 12px !important;
}

.inventory-item-detail-section {
  border-color: var(--border) !important;
  border-radius: 14px !important;
  background: var(--soft-bg) !important;
}

/* Shopping */

.shopping-summary {
  margin-bottom: 12px;
  padding: 16px 18px;
  border-radius: 17px;
  background: linear-gradient(115deg, #173e35, #245f50);
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(11, 42, 34, .15);
}

.shopping-progress-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.shopping-progress-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 1.22rem;
}

.shopping-progress-copy > span {
  color: rgba(255, 255, 255, .72);
  font-size: .78rem;
}

.shopping-summary .section-eyebrow {
  color: #aee0d1;
}

.shopping-progress-track {
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .17);
}

.shopping-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67d7ae, #f3b14c);
  transition: width .25s ease;
}

.shopping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 10px 13px;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.switch-row input,
.check-row input {
  width: 20px !important;
  min-height: 20px !important;
  accent-color: var(--primary);
}

.grocery-shopping-section {
  margin-bottom: 7px !important;
}

.grocery-shopping-heading {
  position: static;
  top: auto;
  z-index: 5;
  margin: 0 -17px;
  padding: 11px 17px 8px !important;
  border-bottom: 1px solid var(--border) !important;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(12px);
}

.grocery-shopping-heading h3 {
  font-size: .88rem !important;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.shopping-row {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 82px 54px auto !important;
  min-height: 66px;
  padding: 10px 0 !important;
  gap: 9px !important;
}

.shopping-row > input[type="checkbox"] {
  position: static !important;
  width: 23px !important;
  min-height: 23px !important;
  margin: 0;
  accent-color: var(--primary);
}

.shopping-row > input[type="number"], .shopping-row > input[type="text"] {
  min-height: 40px;
  padding: 7px 8px;
  text-align: center;
}

.shopping-row.is-checked {
  opacity: .52;
}

.shopping-row.is-checked strong:first-child {
  text-decoration: line-through;
}

.shopping-row .shop-reason {
  color: var(--muted);
  font-size: .66rem;
}

.shopping-row .btn-red {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

/* Weekly planning */

.week-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 13px;
}

.week-summary span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-size: .76rem;
  box-shadow: 0 1px 2px rgba(11, 42, 34, .03);
}

.week-summary strong {
  color: var(--text);
}

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

.week-day-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.week-day-card.is-today {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent), var(--shadow);
}

.week-day-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
  padding: 11px 12px 9px !important;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--card) !important;
  color: var(--text);
}

.week-day-card > header span,
.week-day-card > header small {
  display: block;
}

.week-day-card > header span {
  font-size: .9rem;
  font-weight: 800;
}

.week-day-card > header small {
  color: var(--muted);
  font-size: .7rem;
}

.week-day-card > header .icon-button {
  width: 36px;
  height: 36px;
}

.week-meal-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: calc(100% - 20px);
  min-height: 158px;
  margin: 10px;
  padding: 13px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background:
    radial-gradient(circle at 78% 20%, rgba(242, 173, 67, .26), transparent 9rem),
    linear-gradient(135deg, #173b33, #284959);
  background-image: var(--card-image);
  background-position: center;
  background-size: cover;
  color: #ffffff;
  text-align: left;
  isolation: isolate;
}

.week-meal-visual::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(3, 15, 12, .88), rgba(3, 15, 12, .08));
  content: "";
}

.week-meal-visual strong,
.week-meal-visual small {
  display: block;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.week-meal-visual strong {
  font-size: 1rem;
  line-height: 1.18;
}

.week-meal-visual small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .75);
}

.week-meal-controls {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 8px;
  padding: 0 10px 9px;
}

.week-meal-controls label {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
}

.week-meal-controls select,
.week-meal-controls input {
  min-height: 40px;
  margin-top: 3px;
  padding: 6px 8px;
  font-size: .82rem;
}

.planned-sides {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 34px;
  padding: 0 10px 8px;
  gap: 5px;
}

.planned-sides > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .68rem;
  font-weight: 720;
}

.planned-sides > span button {
  width: 19px;
  height: 19px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.add-side-link {
  min-height: 29px;
  padding: 4px 7px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 720;
}

.week-card-actions {
  padding: 0 10px 8px;
  text-align: right;
}

.open-night {
  display: grid;
  align-content: center;
  min-height: 266px;
  padding: 18px;
  gap: 9px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 60%, transparent), transparent 72%);
  text-align: center;
}

.open-night > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}

/* Menu */

.app-menu {
  top: 53px !important;
  width: min(390px, calc(100vw - 24px)) !important;
  max-height: min(78vh, 720px) !important;
  border-radius: 18px !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-large) !important;
}

.app-menu-scroll {
  scrollbar-width: thin;
}

.ge-menu-status-card {
  margin: 10px !important;
  border-radius: 14px !important;
  background: var(--soft-bg) !important;
}

.app-menu-section {
  padding: 9px 11px 11px !important;
}

.app-menu-title[role="button"] {
  position: relative;
  min-height: 34px;
  margin: 0 !important;
  padding: 9px 28px 7px 4px;
  cursor: pointer;
}

.app-menu-title[role="button"]::after {
  position: absolute;
  top: 8px;
  right: 6px;
  color: var(--muted);
  content: "⌃";
  font-size: .85rem;
  transition: transform .16s ease;
}

.app-menu-section.is-collapsed .app-menu-title[role="button"]::after {
  transform: rotate(180deg);
}

.app-menu-section.is-collapsed > :not(.app-menu-title) {
  display: none !important;
}

.ge-menu-action {
  min-height: 55px !important;
  padding: 9px 7px !important;
}

.ge-menu-action .menu-icon {
  border-radius: 10px !important;
  background: var(--primary-soft) !important;
  color: var(--primary);
}

.ge-menu-action strong {
  font-size: .87rem;
}

.ge-menu-action small {
  font-size: .7rem;
}

/* Modals */

.modal {
  z-index: 200 !important;
  padding: 22px !important;
  background: rgba(4, 17, 13, .62) !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.modal-content {
  max-width: 820px;
  margin: 28px auto;
  padding: 22px !important;
  border: 1px solid var(--border);
  border-radius: 22px !important;
  background: var(--card) !important;
  color: var(--text);
  box-shadow: var(--shadow-large) !important;
  animation: mp6ModalIn .2s ease both;
}

.modal-large {
  max-width: 1040px;
}

.compact-modal {
  max-width: 540px;
}

.modal-header {
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 2px 0 0;
  font-size: 1.55rem;
}

.close-btn {
  display: grid;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border) !important;
  background: var(--soft-bg) !important;
  color: var(--text) !important;
  font-size: 1.25rem;
}

.quick-add-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.quick-add-card {
  min-height: 120px !important;
  border-radius: 16px !important;
  background: var(--soft-bg) !important;
}

.quick-add-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: var(--primary-soft) !important;
}

.compact-form-grid {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px;
}

/* Sync and installation */

.sync-hero {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  padding: 14px;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 24%, var(--border));
  border-radius: 15px;
  background: var(--green-light);
}

.sync-hero.offline {
  border-color: color-mix(in srgb, var(--yellow) 25%, var(--border));
  background: var(--yellow-light);
}

.sync-hero-icon {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 13px;
  background: var(--card);
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 850;
}

.sync-hero.offline .sync-hero-icon {
  color: var(--yellow);
}

.sync-hero strong,
.sync-hero span {
  display: block;
}

.sync-hero > div > span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

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

.sync-detail-grid > div {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--soft-bg);
}

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

.sync-detail-grid span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 680;
  text-transform: uppercase;
}

.sync-detail-grid strong {
  margin-top: 3px;
  font-size: .86rem;
}

.sync-explainer,
.install-note {
  margin: 12px 0;
  padding: 13px;
  border-radius: 12px;
  background: var(--soft-bg);
}

.sync-explainer p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.install-nudge {
  margin: -3px 0 17px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  border-radius: 14px;
  background: var(--primary-soft);
}

.install-nudge,
.install-nudge > div,
.install-nudge > div:first-child > span:last-child {
  display: flex;
  align-items: center;
}

.install-nudge {
  justify-content: space-between;
  gap: 16px;
}

.install-nudge > div {
  gap: 10px;
}

.install-nudge > div:first-child > span:last-child {
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
}

.install-nudge small {
  color: var(--muted);
  font-size: .72rem;
}

.install-mini-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: var(--card);
  color: var(--primary);
  font-weight: 850;
}

.install-intro {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: .9rem;
}

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

.install-steps li,
.install-ready {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  padding: 11px;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--soft-bg);
}

.install-steps li > span,
.install-ready > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 850;
}

.install-steps strong,
.install-steps p,
.install-ready strong,
.install-ready p {
  display: block;
  margin: 0;
}

.install-steps p,
.install-ready p {
  margin-top: 2px;
  color: var(--muted);
  font-size: .77rem;
}

.install-ready + .btn {
  margin-top: 11px;
}

.install-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  color: var(--muted);
  font-size: .76rem;
}

.install-note strong {
  color: var(--text);
}

/* Boot and transient feedback */

.app-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(99, 218, 180, .2), transparent 17rem),
    #102c27;
  color: #ffffff;
  text-align: center;
  transition: opacity .24s ease, visibility .24s ease;
}

.app-boot-screen.is-ready {
  visibility: hidden;
  opacity: 0;
}

.boot-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 23px;
  background: rgba(255, 255, 255, .09);
  animation: mp6BootFloat 1.7s ease-in-out infinite;
}

.boot-mark svg {
  width: 54px;
  height: 54px;
}

.boot-mark circle,
.boot-mark path {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-boot-screen > strong {
  font-size: 1.08rem;
}

.app-boot-screen > span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .62);
  font-size: .82rem;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 500;
  display: grid;
  width: min(390px, calc(100vw - 28px));
  gap: 8px;
  pointer-events: none;
}

.app-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: #17362f;
  color: #ffffff;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .22);
  font-size: .84rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-toast button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  font-size: .76rem;
  font-weight: 750;
}

.universal-add-button {
  right: 24px !important;
  bottom: 24px !important;
  width: 58px !important;
  height: 58px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: var(--primary) !important;
  box-shadow: 0 15px 34px color-mix(in srgb, var(--primary) 34%, transparent) !important;
  font-size: 1.85rem !important;
}

.empty-state {
  padding: 32px 18px;
}

.empty-state h3 {
  margin-bottom: 5px;
  color: var(--text);
}

.empty-state p {
  margin: 0 0 14px;
}

.compact-empty {
  min-height: 90px;
  padding: 23px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.empty-icon {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 1.6rem;
}

/* Existing detailed flows brought into the new system */

.summary-box,
.plan-meal,
.cook-step {
  border: 1px solid var(--border);
  background: var(--soft-bg) !important;
  color: var(--text);
}

.cook-focus-step {
  font-size: clamp(1.5rem, 5vw, 2.25rem) !important;
}

.cook-progress span {
  background: var(--primary) !important;
}

.recipe-category-option {
  border-color: var(--border) !important;
  background: var(--soft-bg) !important;
}

.recipe-category-option.selected {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

.global-result {
  min-height: 62px;
  border-radius: 12px !important;
}

.ge-refresh-action[hidden] {
  display: none !important;
}

.app-update-notice {
  z-index: 600 !important;
  background: #17362f !important;
}

/* Responsive */

@media (max-width: 980px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-card {
    min-height: 92px;
  }

  .tonight-card-grid {
    grid-template-columns: 1fr !important;
  }

  .smart-idea-card {
    grid-template-columns: 58px 1fr 40px;
  }

  .smart-idea-card > img,
  .smart-idea-fallback {
    width: 58px;
    height: 58px;
  }

  .recipe-controls {
    grid-template-columns: minmax(220px, 1fr) 1fr 1fr;
  }

  .recipe-display-toolbar {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .app-banner {
    min-height: var(--header-height);
    padding: 8px 10px 8px 12px !important;
  }

  .banner-mark {
    width: 42px !important;
    height: 42px !important;
    border-radius: 13px !important;
  }

  .banner-mark svg {
    width: 30px !important;
    height: 30px !important;
  }

  .brand-eyebrow,
  .app-banner .small {
    display: none;
  }

  .app-banner h1 {
    font-size: 1.08rem !important;
  }

  .header-icon-button,
  .hamburger-button,
  .active-user-pill,
  .sync-status-button {
    min-width: 42px;
    min-height: 42px;
  }

  .header-icon-button {
    width: 42px;
    height: 42px;
  }

  .sync-status-button {
    min-width: 42px;
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .sync-status-button .sync {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .active-user-pill {
    width: 42px;
    padding: 5px !important;
  }

  .active-user-pill > span:last-child {
    display: none;
  }

  #primaryNav {
    position: fixed !important;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 150;
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: 0 -10px 28px rgba(11, 42, 34, .1);
  }

  #primaryNav .nav-btn {
    flex-direction: column;
    min-height: 56px;
    padding: 4px 2px !important;
    gap: 2px;
    border: 0 !important;
    border-radius: 12px;
    font-size: .66rem !important;
    line-height: 1;
  }

  #primaryNav .nav-btn svg {
    width: 22px;
    height: 22px;
  }

  #primaryNav .nav-btn.active {
    border: 0 !important;
    background: var(--primary-soft);
  }

  #appMain {
    padding: 21px 14px 32px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 17px;
    gap: 13px;
  }

  .page-heading h2 {
    font-size: 1.8rem;
  }

  .page-heading p {
    font-size: .86rem;
  }

  .page-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .page-actions::-webkit-scrollbar {
    display: none;
  }

  .page-actions .btn {
    flex: none;
  }

  .v6-tonight-hero,
  .v6-tonight-overlay {
    min-height: 390px;
  }

  .v6-tonight-hero {
    border-radius: 20px;
  }

  .v6-tonight-hero::before {
    background: linear-gradient(to top, rgba(3, 15, 12, .91) 0%, rgba(3, 15, 12, .53) 58%, rgba(3, 15, 12, .17) 100%);
  }

  .v6-tonight-overlay {
    padding: 18px;
  }

  .tonight-copy h3 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .attention-strip {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .attention-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .quick-action-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .quick-action-bar .button-row {
    width: 100%;
  }

  .quick-action-bar .btn {
    flex: 1;
  }

  .side-suggestion-grid {
    grid-template-columns: 1fr;
  }

  .recipe-controls,
  .inventory-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .recipe-controls .search-field,
  .inventory-toolbar .search-field {
    grid-column: 1 / -1;
  }

  .recipe-controls select,
  .inventory-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .recipe-display-toolbar {
    grid-column: 1 / -1;
  }

  .week-grid {
    grid-template-columns: 1fr;
  }

  .week-day-card {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .week-day-card > header {
    grid-row: 1 / span 4;
    align-content: space-between;
    flex-direction: column;
    padding: 14px 10px !important;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    text-align: center;
  }

  .week-day-card > header .icon-button {
    margin-top: auto;
  }

  .week-meal-visual {
    min-height: 130px;
  }

  .open-night {
    min-height: 205px;
  }

  .shopping-row {
    grid-template-columns: 30px minmax(0, 1fr) 74px 48px !important;
  }

  .shopping-row > :last-child {
    grid-column: 4;
  }

  .shopping-row .badge {
    display: none;
  }

  .modal {
    display: none;
    align-items: flex-end;
    padding: 0 !important;
  }

  .modal.open {
    display: flex !important;
  }

  .modal-content {
    width: 100%;
    max-width: none !important;
    max-height: min(92vh, 900px);
    margin: auto 0 0 !important;
    padding: 19px 16px calc(18px + env(safe-area-inset-bottom)) !important;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 23px 23px 0 0 !important;
    animation-name: mp6SheetIn;
  }

  .app-menu {
    position: fixed !important;
    top: 70px !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-height: calc(100vh - 150px) !important;
  }

  .universal-add-button {
    right: 14px !important;
    bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    width: 54px !important;
    height: 54px !important;
  }

  .toast-region {
    right: 14px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .banner-copy {
    gap: 8px !important;
  }

  .header-icon-button {
    display: none;
  }

  .banner-actions {
    gap: 5px !important;
  }

  .overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-right: -14px;
    margin-left: -14px;
    padding: 0 14px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .overview-grid::-webkit-scrollbar {
    display: none;
  }

  .overview-card {
    width: 125px;
    min-height: 86px;
    padding: 12px;
    border-radius: 14px;
    scroll-snap-align: start;
  }

  .overview-card strong {
    font-size: 1.28rem;
  }

  .compact-overview .overview-card {
    min-height: 80px;
  }

  .install-nudge {
    align-items: flex-start;
  }

  .install-nudge small {
    display: none;
  }

  .install-nudge .btn {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tonight-topline {
    margin-bottom: 110px;
  }

  .readiness-ring {
    width: 68px;
    height: 68px;
  }

  .tonight-meta {
    gap: 6px 12px;
    font-size: .8rem;
  }

  .tonight-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .tonight-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .quick-action-bar .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quick-action-bar .btn-quiet {
    grid-column: 1 / -1;
  }

  .empty-tonight {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .empty-tonight-icon {
    width: 50px;
    height: 50px;
  }

  .empty-tonight .button-row {
    display: grid;
  }

  .content-section {
    margin-top: 24px;
  }

  .smart-idea-card {
    grid-template-columns: 55px minmax(0, 1fr) 38px;
    padding: 8px;
  }

  .smart-idea-card > img,
  .smart-idea-fallback {
    width: 55px;
    height: 55px;
  }

  .recipe-controls,
  .inventory-toolbar {
    grid-template-columns: 1fr;
  }

  .recipe-controls .search-field,
  .inventory-toolbar .search-field,
  .recipe-display-toolbar {
    grid-column: auto;
  }

  .recipe-display-toolbar {
    justify-self: stretch;
  }

  .recipe-view-btn {
    flex: 1;
  }

  .recipe-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }

  .v6-inventory-row {
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 7px;
    padding: 10px 0;
  }

  .inventory-item-main {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .inventory-item-main .status-pill {
    grid-column: 2;
    justify-self: start;
    margin-top: -3px;
  }

  .inline-quantity {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 42px 1fr 42px;
  }

  .row-more-button {
    grid-column: 2;
    grid-row: 1;
  }

  .shopping-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .shopping-progress-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .shopping-row {
    grid-template-columns: 30px minmax(0, 1fr) 72px !important;
    padding: 12px 0 !important;
  }

  .shopping-row > input[type="number"], .shopping-row > input[type="text"] {
    grid-column: 3;
  }

  .shopping-row > strong {
    grid-column: 3;
    color: var(--muted);
    font-size: .7rem;
    text-align: center;
  }

  .shopping-row > .btn-red {
    grid-column: 3;
  }

  .week-day-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .week-meal-controls {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .quick-add-grid {
    grid-template-columns: 1fr !important;
  }

  .quick-add-card {
    min-height: 86px !important;
  }

  .compact-form-grid,
  .sync-detail-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 390px) {
  .banner-mark {
    display: none !important;
  }

  .app-banner h1 {
    font-size: 1rem !important;
  }

  #primaryNav .nav-btn {
    font-size: .61rem !important;
  }

  #primaryNav .nav-btn svg {
    width: 21px;
    height: 21px;
  }

  .week-day-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }
}

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

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

@keyframes mp6SheetIn {
  from { transform: translateY(26px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes mp6Pulse {
  50% { opacity: .42; transform: scale(.82); }
}

@keyframes mp6BootFloat {
  50% { transform: translateY(-5px); }
}

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

.notification-panel{width:min(600px,94vw);max-height:88dvh;overflow:auto;padding:24px;border-radius:22px;background:var(--card);color:var(--text,#edf4ef)}
.notification-panel fieldset{margin:16px 0;padding:16px;border:1px solid currentColor;border-radius:12px}
.notification-panel label{display:block;margin:10px 0}.notification-panel .notification-check{display:flex;gap:10px;align-items:center}.notification-check input{width:20px;height:20px;flex:none}.notification-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.notification-actions{display:flex;gap:8px;flex-wrap:wrap}.notification-panel input:not([type=checkbox]),.notification-panel select{width:100%;min-height:44px}.notification-panel .muted{font-size:.88rem;opacity:.8}.notification-panel button{min-height:44px}.notification-panel .modal-header{display:flex;align-items:center;justify-content:space-between}

.grocery-section-edit{display:block;margin-top:6px;font-size:.78rem;min-height:36px;padding:6px 10px}
/* Inventory sort headings share the existing compact list. */
.inventory-group-heading{grid-column:1/-1;margin:14px 0 0;padding:12px 14px;border-bottom:1px solid #77867755;font-size:1rem}
.inventory-toolbar label{display:flex;flex-direction:column;gap:4px;min-width:0}
.inventory-toolbar label select{max-width:100%;min-height:44px}
.inventory-toolbar label{grid-column:1/-1;justify-self:start;width:min(100%,320px)}

/* Recipe actions occupy their own row instead of overlapping a long title. */
#recipeGrid:not(.recipe-view-list) .recipe-card-actions{position:relative;z-index:8;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-height:66px;padding:12px;box-sizing:border-box}
#recipeGrid:not(.recipe-view-list) .recipe-card-actions .recipe-card-icon-button,
#recipeGrid:not(.recipe-view-list) .recipe-card-actions .favorite-star{position:static!important;flex:0 0 42px;margin:0!important}
#recipeGrid:not(.recipe-view-list) .meal-card-overlay-content{min-height:234px!important;padding:16px!important;box-sizing:border-box}
#recipeGrid:not(.recipe-view-list) .recipe-title{width:100%;min-width:0;margin:0 0 10px!important;padding:0!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:anywhere;text-wrap:pretty}
#recipeGrid.recipe-view-small .recipe-title{font-size:1rem!important}
#recipeGrid.recipe-view-list .recipe-title{white-space:normal!important;overflow-wrap:anywhere;line-height:1.35!important;min-width:0}

.inventory-fit-note {font-size: .8rem; line-height: 1.45; margin-top: .5rem; color: var(--text-secondary, inherit); overflow-wrap: anywhere;}

.shopping-alternative {margin: .4rem 0; font-size:.85rem; line-height:1.45;}
.shopping-alternative summary {cursor:pointer;display:list-item;color:var(--text-primary,inherit);font-weight:700;padding:.35rem .5rem;border:1px solid currentColor;border-radius:.5rem;width:fit-content;}
.shopping-alternative > div {padding:.5rem;overflow-wrap:anywhere;}
.shopping-alternative > div > div {margin-bottom:.5rem;}

.coordinated-cook .cook-step{margin:14px 0;padding:16px;border:1px solid currentColor;border-radius:12px}.coordinated-cook .cooking-due{border:3px solid #d99d36}.coordinated-cook input[type=number]{max-width:100px}.coordinated-cook details{margin:12px 0}.coordinated-cook #coordinatedCookStatus{padding:12px 0;font-weight:700}
.cooking-island{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:180;display:flex;align-items:center;gap:12px;width:min(480px,calc(100% - 24px));min-height:76px;padding:12px 18px;border:2px solid #50695d;border-radius:28px;background:#14251e;color:#fff;box-shadow:0 8px 28px #0006;text-align:left;cursor:pointer;font:inherit}
.cooking-island[hidden]{display:none!important}
.cooking-island-timer{font-size:1.3rem;font-weight:800;font-variant-numeric:tabular-nums;flex-shrink:0}
.cooking-island-copy{min-width:0;flex:1}
.cooking-island-copy strong{display:block;font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cooking-island-copy>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.35;font-size:.8rem;margin-top:4px}
.cooking-island.needs-attention{border-color:#efb955}
.cooking-island:focus-visible{outline:3px solid #efb955;outline-offset:3px}
body.has-cooking-island{padding-bottom:125px}
@media(max-width:760px){.cooking-island{bottom:calc(84px + env(safe-area-inset-bottom))}body.has-cooking-island{padding-bottom:calc(205px + env(safe-area-inset-bottom))}}

/* Dinner timing: inherits the existing theme and mobile modal behavior. */
.dinner-panel {max-width:760px}
.dinner-panel details {margin:16px 0;padding:14px;border:1px solid var(--line, #667566);border-radius:14px}
.dinner-panel summary {cursor:pointer;font-weight:700}
.dinner-panel p {line-height:1.5;margin:12px 0}
.dinner-panel textarea {width:100%;box-sizing:border-box;margin:8px 0}
.dinner-time-fields {display:grid;grid-template-columns:1fr 1fr;gap:14px}
.dinner-time-fields label {display:grid;gap:6px}
.dinner-time-fields input,.dinner-time-fields select {width:100%;min-width:0}
.dinner-link-row {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0}
.dinner-link-row label {overflow-wrap:anywhere}
.dinner-step {padding:14px 0;border-bottom:1px solid var(--line, #667566)}
.dinner-step-fields {display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.dinner-step-fields input[type=number] {width:90px}
.dinner-panel input[type=checkbox] {width:20px;min-width:20px;height:20px;vertical-align:middle}
#dinnerMessage {white-space:pre-wrap}
@media(max-width:480px){.dinner-time-fields{grid-template-columns:1fr}.dinner-link-row{align-items:flex-start}}
