:root {
  --bg: #f5f1e9;
  --panel: #fffdfa;
  --panel-strong: #ffffff;
  --text: #193b31;
  --muted: #6d7d75;
  --line: #e7e0d5;
  --green: #1f5a46;
  --green-quiet: #eaf3ee;
  --terracotta: #d97949;
  --terracotta-quiet: #fbebdf;
  --yellow: #d5ad5c;
  --slate: #23463b;
  --shadow: 0 18px 50px rgba(45, 57, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(180deg, rgba(63, 125, 90, 0.08), transparent 330px),
    var(--bg);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

img,
svg,
video {
  max-width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 4px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(239, 145, 72, 0.3);
  background: #fff8ef;
  box-shadow: 0 10px 24px rgba(23, 57, 74, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

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

.developer-credit {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(23, 57, 74, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
}

.developer-credit span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.developer-credit img {
  display: block;
  width: min(162px, 100%);
  height: auto;
  object-fit: contain;
}

.sidebar-credit {
  margin-top: auto;
}

.main-credit {
  display: none;
  max-width: 1260px;
  margin: 22px auto 0;
}

.nav-item,
.mobile-nav-item {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.nav-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active,
.mobile-nav-item.active {
  color: var(--text);
  background: var(--green-quiet);
}

.main {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px clamp(18px, 3vw, 42px) 42px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  max-width: 1260px;
  margin: 0 auto 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.account-pill {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
}

.view {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.recipe-card,
.day-card,
.list-card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(16px, 2vw, 24px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
}

.hero-copy h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.1;
  max-width: 760px;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.home-photo-frame {
  min-height: 300px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(239, 145, 72, 0.22);
  background: #f6efe4;
  box-shadow: 0 18px 40px rgba(23, 57, 74, 0.12);
}

.home-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center;
}

.actions,
.form-row,
.chips,
.card-actions,
.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: white;
  background: var(--green);
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  white-space: normal;
}

.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.button.secondary {
  color: var(--green);
  border-color: rgba(63, 125, 90, 0.3);
  background: var(--green-quiet);
}

.button.warm {
  color: #fff;
  background: var(--terracotta);
}

.button.danger {
  color: #8f2f24;
  border-color: rgba(143, 47, 36, 0.24);
  background: #fff1ee;
}

.button.ghost {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-strong);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover,
.text-button:focus-visible {
  color: var(--terracotta);
}

.recipe-report-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 4px;
  font-size: 0.86rem;
}

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

.compact-actions {
  margin-top: 12px;
}

.stacked-form {
  display: grid;
  gap: 14px;
}

.callout {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.callout.soft {
  border-color: rgba(63, 125, 90, 0.2);
  background: var(--green-quiet);
}

.quiet-actions {
  gap: 8px;
}

.page-toolbar,
.selection-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.selection-toolbar {
  align-items: center;
  padding-top: 2px;
}

.selection-status {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.selection-status strong {
  color: var(--green);
}

.soft-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.soft-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 800;
}

.budget-estimate-box {
  border-color: rgba(239, 145, 72, 0.28);
}

.budget-estimate-box summary {
  color: var(--terracotta);
}

.future-note {
  border-color: rgba(239, 145, 72, 0.24);
  background:
    linear-gradient(135deg, rgba(253, 228, 208, 0.42), transparent 58%),
    var(--panel);
}

.future-note .muted {
  max-width: 880px;
  line-height: 1.6;
}

.compact-form {
  margin-top: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.stat strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.55rem;
}

.muted {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.filters > .field:first-child,
.filters .allergy-field {
  grid-column: span 2;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel-strong);
}

.field textarea {
  resize: vertical;
}

.allergy-picker-button {
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  gap: 12px;
  text-align: left;
}

.allergy-picker-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.allergy-picker-button strong {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 0.88rem;
  white-space: nowrap;
}

.filter-wide {
  grid-column: span 2;
}

.compact-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 700;
}

.inline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.compact-check {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 0.88rem;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 57, 74, 0.38);
}

.modal-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 55px rgba(23, 57, 74, 0.24);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding-inline: 0;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.selection-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.summary-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(63, 125, 90, 0.2);
  border-radius: 8px;
  background: var(--green-quiet);
  color: var(--text);
  font-weight: 700;
}

.summary-chip strong {
  color: var(--green);
  font-size: 1.05rem;
}

.generator-availability {
  margin: 14px 0;
}

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

.availability-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) repeat(3, minmax(90px, 1fr));
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.availability-row.ok {
  border-color: rgba(63, 125, 90, 0.28);
}

.availability-row.warning {
  border-color: rgba(194, 118, 67, 0.4);
  background: #fff7ed;
}

.availability-row.danger {
  border-color: rgba(160, 74, 62, 0.4);
  background: #fff1ee;
}

.availability-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

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

.results-footer {
  justify-content: center;
  padding: 8px 0 20px;
}

.recipe-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  align-content: space-between;
  overflow: hidden;
  border-top: 4px solid rgba(239, 145, 72, 0.36);
}

.recipe-card.selected {
  border-color: rgba(63, 125, 90, 0.75);
  background: #f4fbf6;
}

.recipe-preview-hero {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
  background: var(--green-quiet);
}

.recipe-preview-hero {
  aspect-ratio: 21 / 8;
  margin-bottom: 16px;
}

.recipe-preview-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(23, 57, 74, 0.22));
  pointer-events: none;
}

.recipe-preview-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.recipe-meta,
.meal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.tag,
.meal-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--slate);
  background: var(--green-quiet);
  font-size: 0.8rem;
  font-weight: 700;
}

.meal-type {
  background: var(--terracotta-quiet);
}

.leftover-tag {
  color: #fff;
  background: var(--terracotta);
}

.leftover-source-tag {
  color: var(--green);
  background: #eef6e9;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

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

.menu-style-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(430px, 100%);
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.menu-style-option {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.menu-style-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-style-option:has(input:checked) {
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 14px rgba(23, 57, 74, 0.12);
}

.menu-style-option:focus-within {
  box-shadow: 0 0 0 3px rgba(23, 57, 74, 0.16);
}

.generator-preferences {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.generator-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: stretch;
}

.generator-actions .button {
  min-height: 46px;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.choice-card {
  min-height: 48px;
}

.choice-card input,
.check-card input {
  accent-color: var(--green);
}

.choice-card:has(input:checked),
.check-card:has(input:checked) {
  border-color: rgba(23, 57, 74, 0.32);
  background: var(--green-quiet);
}

.inline-switch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.inline-switch input {
  position: relative;
  flex: 0 0 auto;
  appearance: none;
  width: 46px;
  height: 26px;
  border: 1px solid rgba(23, 57, 74, 0.18);
  border-radius: 999px;
  background: #dfe5e5;
  transition: background 140ms ease, border-color 140ms ease;
}

.inline-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(23, 57, 74, 0.2);
  transition: transform 140ms ease;
}

.inline-switch input:checked {
  border-color: rgba(23, 57, 74, 0.32);
  background: var(--green);
}

.inline-switch input:checked::after {
  transform: translateX(20px);
}

.inline-switch span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.inline-switch strong {
  color: var(--text);
}

.inline-switch small {
  color: var(--muted);
  line-height: 1.35;
}

.calendar-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.summary-card {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(63, 125, 90, 0.18);
  border-radius: 8px;
  background: var(--green-quiet);
}

.summary-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 1.45rem;
}

.summary-card span {
  color: var(--muted);
  font-weight: 700;
}

.grocery-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.grocery-progress > div:first-child {
  display: grid;
  gap: 2px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--green-quiet);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 14px;
}

.calendar-grid-month {
  grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
}

.calendar-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.segmented-control button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segmented-control button.active {
  color: #fff;
  background: var(--green);
}

.calendar-period-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.calendar-clear-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.calendar-period-nav strong {
  min-width: min(330px, 44vw);
  text-align: center;
}

.calendar-nav-button {
  width: 38px;
  min-width: 38px;
  padding-inline: 0;
}

.day-focus {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.day-focus-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(230, 240, 242, 0.9) 58%, rgba(253, 228, 208, 0.88)),
    var(--panel);
}

.day-focus-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.day-focus-hero .muted {
  max-width: 680px;
}

.day-warning {
  max-width: 680px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(239, 145, 72, 0.28);
  border-radius: 8px;
  color: var(--text);
  background: var(--terracotta-quiet);
  font-weight: 800;
}

.day-focus-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  min-width: 330px;
}

.day-focus-stats span {
  display: grid;
  gap: 2px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid rgba(23, 57, 74, 0.12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.day-focus-stats strong {
  color: var(--green);
  font-size: 1.25rem;
}

.day-focus-list {
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2vw, 20px);
}

.day-meal-card.meal-row-clickable {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.day-meal-card.meal-row-clickable:hover,
.day-meal-card.meal-row-clickable:focus-visible {
  border-color: rgba(23, 57, 74, 0.26);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(23, 57, 74, 0.12);
  transform: translateY(-1px);
}

.day-meal-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.day-meal-main {
  min-width: 0;
}

.day-meal-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.day-meal-main h3 {
  margin-bottom: 7px;
  font-size: 1.12rem;
}

.day-meal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.day-meal-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-quiet);
}

.meal-note {
  margin: 9px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--terracotta);
  border-radius: 6px;
  color: var(--text);
  background: rgba(253, 228, 208, 0.5);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.meal-beverages {
  display: grid;
  gap: 6px;
  max-width: 100%;
  margin: 9px 0 2px;
}

.meal-beverage-button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 32px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(239, 145, 72, 0.22);
  border-radius: 8px;
  color: var(--text);
  background: rgba(253, 228, 208, 0.42);
  text-align: left;
}

.meal-beverage-button::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--terracotta);
}

.meal-beverage-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meal-beverage-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meal-beverage-button:hover,
.meal-beverage-button:focus-visible {
  border-color: rgba(23, 57, 74, 0.24);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(239, 145, 72, 0.12);
  outline: none;
}

.day-addons {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.day-addons-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.day-addons-head h3 {
  margin-bottom: 0;
}

.day-addons-head span {
  color: var(--muted);
  font-weight: 800;
}

.day-addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.day-addon-card.meal-row-clickable {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.day-card {
  padding: 15px;
}

.day-card-compact {
  padding: 12px;
}

.day-card-compact h3 {
  margin-bottom: 10px;
  font-size: 0.96rem;
}

.day-card-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.meal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.meal-row-clickable {
  cursor: pointer;
  border-radius: 8px;
  margin-inline: -8px;
  padding: 12px 8px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.meal-row-clickable:hover {
  background: var(--green-quiet);
}

.meal-row-clickable:focus-visible {
  background: var(--green-quiet);
  box-shadow: 0 0 0 3px rgba(23, 57, 74, 0.18);
  outline: none;
}

.meal-row:first-of-type {
  border-top: 0;
}

.meal-row-addon {
  opacity: 0.92;
}

.meal-pill.meal-row-clickable {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.meal-pill:first-of-type {
  margin-top: 0;
}

.meal-pill strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.meal-pill small {
  color: var(--muted);
  font-weight: 800;
}

.meal-pill-addon {
  background: rgba(255, 255, 255, 0.72);
}

.meal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.recipe-modal-panel {
  width: min(860px, 100%);
}

.report-modal-panel {
  width: min(620px, 100%);
}

.share-modal-panel {
  width: min(640px, 100%);
}

.share-device-button {
  width: 100%;
}

.share-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.share-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.share-link-row input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel-strong);
}

.recipe-focus-content {
  margin-top: 16px;
}

.list-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.list-card {
  padding: 16px;
}

.grocery-category {
  margin-top: 16px;
}

.grocery-category:first-child {
  margin-top: 0;
}

.grocery-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.grocery-item label,
.grocery-item strong,
.grocery-amount {
  min-width: 0;
  overflow-wrap: anywhere;
}

.grocery-amount {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.grocery-amount span,
.purchase-note {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.purchase-note {
  display: block;
  margin-top: 4px;
  text-decoration: none;
}

.inventory-note {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--green);
  background: #eef6e9;
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
}

.grocery-item:first-of-type {
  border-top: 0;
}

.grocery-item.checked label {
  text-decoration: line-through;
  color: var(--muted);
}

.pantry-list,
.budget-price-list {
  display: grid;
  gap: 10px;
}

.pantry-row,
.budget-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.pantry-row-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pantry-clickable-row {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pantry-clickable-row:hover,
.pantry-clickable-row:focus-visible,
.pantry-row-button:hover,
.pantry-row-button:focus-visible {
  border-color: rgba(88, 129, 87, 0.4);
  box-shadow: 0 10px 28px rgba(23, 57, 74, 0.09);
  outline: none;
}

.pantry-hint {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 0.78rem;
}

.pantry-email-note {
  margin-top: 12px;
}

.pantry-modal-panel {
  width: min(720px, 100%);
}

.reminder-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.reminder-box-head,
.reminder-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.reminder-box-head {
  margin-bottom: 10px;
}

.reminder-box-head h3 {
  margin: 0;
}

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

.reminder-row {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.reminder-row span {
  color: var(--muted);
  font-weight: 800;
}

.compact-empty {
  padding: 14px;
}

.budget-price-row {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.35fr) minmax(140px, 0.45fr);
}

.pantry-row > div,
.budget-price-row > div:first-child {
  min-width: 0;
}

.pantry-row strong,
.budget-price-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.pantry-row span,
.budget-price-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--green-quiet);
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.ok {
  color: var(--green);
  background: #eef6e9;
}

.status-pill.warning {
  color: #8a5a18;
  background: #fff5d6;
}

.status-pill.danger {
  color: #8f2f24;
  background: #fff1ee;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

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

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 8px;
  color: white;
  background: var(--slate);
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding-inline: clamp(14px, 4vw, 24px);
    padding-bottom: 96px;
  }

  .main-credit {
    display: grid;
    width: min(260px, 100%);
  }

  .topbar {
    align-items: center;
    min-width: 0;
  }

  .topbar > div {
    min-width: 0;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.96);
    box-shadow: var(--shadow);
  }

  .mobile-nav-item {
    min-height: 46px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .hero-panel,
  .grid.two,
  .grid.three,
  .generator-preferences,
  .generator-actions,
  .list-layout,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .page-toolbar,
  .selection-toolbar,
  .calendar-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .page-toolbar > *,
  .selection-toolbar > *,
  .calendar-controls > * {
    min-width: 0;
  }

  .page-toolbar .actions,
  .selection-toolbar .actions {
    width: 100%;
    justify-content: stretch;
  }

  .page-toolbar .actions .button,
  .selection-toolbar .actions .button {
    flex: 1 1 min(170px, 100%);
  }

  .generator-actions .button {
    width: 100%;
  }

  .availability-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .availability-row strong {
    grid-column: 1 / -1;
  }

  .recipe-grid,
  .calendar-grid,
  .calendar-grid-month,
  .day-addon-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-focus-hero {
    grid-template-columns: 1fr;
  }

  .day-focus-stats {
    min-width: 0;
    width: 100%;
  }

  .day-meal-card.meal-row-clickable {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .day-meal-card .meal-actions {
    grid-column: 2;
  }

  .day-addon-card.meal-row-clickable,
  .pantry-row,
  .budget-price-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .calendar-period-nav strong {
    min-width: 0;
    flex: 1;
  }

  .filter-wide {
    grid-column: 1 / -1;
  }

  .filters > .field:first-child,
  .filters .allergy-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 18px 10px 96px;
  }

  .topbar {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
  }

  .topbar h1 {
    font-size: 1.65rem;
  }

  .account-pill {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }

  .panel {
    padding: 14px;
  }

  .actions,
  .form-row,
  .card-actions,
  .list-actions {
    align-items: stretch;
    width: 100%;
  }

  .actions .button,
  .form-row .button,
  .card-actions .button,
  .list-actions .button {
    flex: 1 1 100%;
    width: 100%;
  }

  .filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .filters > .field:first-child,
  .filters .allergy-field {
    grid-column: 1 / -1;
  }

  .segmented-control,
  .calendar-period-nav,
  .calendar-clear-actions {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
  }

  .calendar-clear-actions .button {
    flex: 1;
  }

  .day-focus-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-focus-stats span {
    min-height: 56px;
    padding: 9px;
    font-size: 0.82rem;
  }

  .day-meal-card.meal-row-clickable {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 13px;
  }

  .day-meal-card .meal-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .day-meal-card .meal-actions .button,
  .meal-row .meal-actions .button,
  .day-addon-card .button {
    width: 100%;
  }

  .meal-row {
    grid-template-columns: 1fr;
  }

  .meal-actions {
    justify-content: space-between;
  }

  .meal-actions .button,
  .day-card-actions .button,
  .pantry-row .button {
    flex: 1 1 100%;
    width: 100%;
  }

  .menu-style-control {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .menu-style-option {
    justify-items: start;
    padding-inline: 12px;
  }

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

  .checkbox-grid,
  .choice-grid,
  .selection-breakdown,
  .calendar-summary,
  .stat-grid,
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .availability-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .availability-row span {
    font-size: 0.86rem;
  }

  .grocery-progress {
    grid-template-columns: minmax(0, 1fr);
  }

  .grocery-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .grocery-amount,
  .grocery-item strong {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100dvh - 20px);
  }

  .share-option-grid,
  .share-link-row {
    grid-template-columns: 1fr;
  }

  .home-photo-frame,
  .home-photo {
    min-height: 220px;
  }
}

/* Premium interface refresh */
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 80% -10%, rgba(217, 121, 73, 0.1), transparent 34rem),
    radial-gradient(circle at 4% 5%, rgba(31, 90, 70, 0.1), transparent 30rem),
    var(--bg);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a,
input,
select,
textarea {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(217, 121, 73, 0.32);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  padding: 24px 18px 20px;
  border-right-color: rgba(31, 90, 70, 0.12);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 12px 0 40px rgba(44, 55, 47, 0.04);
}

.brand {
  grid-template-columns: 58px 1fr;
  gap: 13px;
  margin: 0 6px 30px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(217, 121, 73, 0.2);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff9f1, #f7ecdf);
  box-shadow: 0 12px 30px rgba(74, 58, 40, 0.1);
}

.brand strong {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 4px;
  font-size: 0.77rem;
}

.nav-list {
  gap: 5px;
}

.nav-item {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 13px;
  color: #63736b;
  font-size: 0.94rem;
  font-weight: 720;
}

.nav-item svg,
.mobile-nav-item svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -18px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: transparent;
}

.nav-item:hover {
  color: var(--green);
  background: rgba(234, 243, 238, 0.72);
  transform: translateX(2px);
}

.nav-item.active {
  color: var(--green);
  background: var(--green-quiet);
  box-shadow: inset 0 0 0 1px rgba(31, 90, 70, 0.08);
}

.nav-item.active::after {
  background: var(--terracotta);
}

.developer-credit {
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.72);
  box-shadow: none;
}

.main {
  padding: 34px clamp(22px, 3.5vw, 58px) 56px;
}

.topbar,
.view {
  max-width: 1440px;
}

.topbar {
  margin-bottom: 28px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--terracotta);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

h1,
h2 {
  color: #17392f;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h2 {
  font-size: clamp(1.3rem, 2vw, 1.62rem);
}

h3 {
  color: #1b3930;
  line-height: 1.25;
}

.account-pill {
  padding: 10px 15px;
  border-color: rgba(31, 90, 70, 0.12);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 253, 250, 0.9);
  box-shadow: 0 8px 24px rgba(45, 57, 48, 0.06);
  font-size: 0.88rem;
  font-weight: 750;
}

.account-pill::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #68a67f;
  box-shadow: 0 0 0 4px rgba(104, 166, 127, 0.12);
}

.grid {
  gap: 20px;
}

.panel,
.recipe-card,
.day-card,
.list-card,
.day-focus {
  border-color: rgba(75, 75, 58, 0.12);
  border-radius: 20px;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: 0 16px 46px rgba(55, 62, 52, 0.075);
}

.panel {
  padding: clamp(19px, 2.3vw, 30px);
}

.hero-panel {
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  min-height: 390px;
  padding: clamp(26px, 4vw, 50px);
  border: 1px solid rgba(31, 90, 70, 0.11);
  background:
    linear-gradient(120deg, rgba(255, 253, 250, 0.99), rgba(246, 238, 226, 0.94)),
    var(--panel);
}

.hero-copy h2 {
  max-width: 680px;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  line-height: 1.04;
}

.hero-copy p {
  max-width: 620px;
  color: #62726a;
  font-size: 1.08rem;
  line-height: 1.7;
}

.home-photo-frame,
.recipe-preview-hero {
  border-radius: 17px;
}

.home-photo-frame {
  border-color: rgba(217, 121, 73, 0.17);
  box-shadow: 0 24px 50px rgba(69, 57, 43, 0.14);
  transform: rotate(0.4deg);
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(31, 90, 70, 0.13);
  font-weight: 760;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 90, 70, 0.18);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button.secondary,
.button.ghost {
  box-shadow: none;
}

.button.secondary {
  border-color: rgba(31, 90, 70, 0.18);
}

.button.ghost {
  color: #53685f;
  border-color: rgba(83, 104, 95, 0.18);
  background: rgba(255, 255, 255, 0.65);
}

.button.warm {
  background: var(--terracotta);
  box-shadow: 0 7px 18px rgba(217, 121, 73, 0.16);
}

.button.danger {
  color: #a84f43;
  border-color: rgba(168, 79, 67, 0.18);
  background: #fff7f4;
  box-shadow: none;
}

.button.small {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 10px;
}

input,
select,
textarea {
  border-radius: 12px;
  border-color: rgba(87, 94, 80, 0.18);
  background: rgba(255, 255, 255, 0.88);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 90, 70, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 90, 70, 0.09);
}

.stat-grid {
  gap: 12px;
}

.stat,
.summary-card {
  border-color: rgba(31, 90, 70, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(234, 243, 238, 0.78));
  box-shadow: 0 10px 28px rgba(45, 57, 48, 0.05);
}

.stat strong,
.summary-card strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.02em;
}

.tag,
.meal-type {
  min-height: 25px;
  padding: 4px 9px;
  font-size: 0.75rem;
  font-weight: 760;
}

.meal-type {
  color: #9b512f;
  background: var(--terracotta-quiet);
}

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

.recipe-card {
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 0;
}

.recipe-card:hover {
  border-color: rgba(31, 90, 70, 0.2);
  box-shadow: 0 22px 54px rgba(55, 62, 52, 0.11);
  transform: translateY(-2px);
}

.recipe-card.selected {
  border-color: rgba(31, 90, 70, 0.45);
  background: #fbfffc;
  box-shadow: 0 18px 46px rgba(31, 90, 70, 0.12);
}

.recipe-card-media {
  position: relative;
  height: 158px;
  margin: 0 -18px;
  overflow: hidden;
  border-radius: 19px 19px 0 0;
  background: var(--green-quiet);
}

.recipe-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(24, 48, 40, 0.24));
}

.recipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-card-media .meal-type {
  position: absolute;
  z-index: 1;
  left: 12px;
  bottom: 12px;
  box-shadow: 0 5px 14px rgba(39, 43, 35, 0.12);
}

.recipe-card-copy h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.recipe-card-copy .muted {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 0;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-actions {
  padding-top: 12px;
  border-top: 1px solid rgba(87, 94, 80, 0.11);
}

.menu-style-control,
.check-card,
.inline-switch,
.availability-row,
.segmented-control {
  border-radius: 13px;
}

.menu-style-option {
  border-radius: 9px;
}

/* Calendar: keep content readable even with a full month of meals. */
.calendar-overview {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.5vw, 32px);
  background:
    radial-gradient(circle at 100% 0, rgba(217, 121, 73, 0.1), transparent 24rem),
    rgba(255, 253, 250, 0.98);
}

.calendar-overview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 72px;
  height: 4px;
  border-radius: 0 0 5px 5px;
  background: var(--terracotta);
}

.calendar-controls {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(31, 90, 70, 0.1);
  border-radius: 16px;
  background: rgba(247, 244, 237, 0.72);
}

.segmented-control {
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
}

.segmented-control button {
  border-radius: 9px;
}

.calendar-period-nav {
  justify-content: center;
}

.calendar-period-nav strong {
  min-width: min(260px, 35vw);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
}

.calendar-nav-button {
  border-radius: 50%;
}

.calendar-summary {
  gap: 12px;
  margin-top: 18px;
}

.summary-card {
  position: relative;
  min-height: 92px;
  padding: 16px 17px;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(217, 121, 73, 0.08);
}

.summary-card strong {
  margin-bottom: 6px;
  font-size: 1.7rem;
}

.summary-card span {
  color: #66776f;
  font-size: 0.86rem;
}

.soft-details {
  margin-top: 18px;
  padding-top: 16px;
}

.soft-details summary {
  color: var(--green);
  font-weight: 760;
}

.calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 20px;
  align-items: start;
}

.calendar-grid-month {
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
}

.day-card {
  padding: 0;
  overflow: hidden;
}

.day-card:hover {
  border-color: rgba(31, 90, 70, 0.18);
  box-shadow: 0 22px 54px rgba(55, 62, 52, 0.105);
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(87, 94, 80, 0.11);
  background: linear-gradient(135deg, #f8f4ed, #eef5f1);
}

.day-card-header h3 {
  margin: 3px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.day-card-kicker {
  color: var(--terracotta);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.day-card-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(31, 90, 70, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
}

.meal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0 12px;
  padding: 16px 6px;
  border-top-color: rgba(87, 94, 80, 0.11);
}

.day-card-header + .meal-row {
  border-top: 0;
}

.meal-row-clickable {
  margin-inline: 12px;
  padding-inline: 6px;
  border-radius: 14px;
}

.meal-row-clickable:hover {
  background: rgba(234, 243, 238, 0.64);
}

.meal-row-content {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
}

.meal-row-media {
  width: 86px;
  height: 86px;
  margin: 0;
  overflow: hidden;
  border-radius: 13px;
  background: var(--green-quiet);
  box-shadow: 0 8px 20px rgba(55, 62, 52, 0.1);
}

.meal-row-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-row-copy {
  min-width: 0;
}

.meal-row-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.meal-row-copy h3 {
  margin-bottom: 7px;
  font-size: 1.02rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.meal-row-copy > .muted {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  color: #6c7b74;
  font-size: 0.82rem;
}

.meal-row-copy > .muted span {
  display: inline-flex;
  align-items: center;
}

.meal-row-copy > .muted span + span::before {
  content: "•";
  margin-right: 6px;
  color: var(--terracotta);
}

.meal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.meal-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 7px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.meal-actions .button span {
  margin-right: 3px;
  font-size: 1rem;
  line-height: 1;
}

.day-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 13px 18px 17px;
  border-top-color: rgba(87, 94, 80, 0.11);
  background: rgba(248, 245, 238, 0.52);
}

.day-card-actions .button {
  width: 100%;
}

.day-card-compact {
  padding: 0;
}

.day-card-compact .day-card-header {
  min-height: 68px;
  padding: 13px 15px;
}

.day-card-compact .day-card-header h3 {
  margin-bottom: 0;
}

.day-card-compact .meal-pill {
  margin-inline: 12px;
}

.day-focus-hero {
  border-radius: 19px 19px 0 0;
}

.modal-panel {
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(24, 40, 33, 0.22);
}

.mobile-nav-item {
  display: grid;
  grid-template-rows: 22px auto;
  place-items: center;
  gap: 3px;
}

.mobile-nav-item svg {
  width: 19px;
  height: 19px;
}

.mobile-nav-item span {
  font-size: 0.7rem;
}

@media (max-width: 1240px) {
  .calendar-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-period-nav strong {
    min-width: 0;
    flex: 1;
  }

  .calendar-clear-actions {
    justify-content: stretch;
  }

  .calendar-clear-actions .button {
    flex: 1;
  }
}

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

  .main {
    padding: 24px 18px 102px;
  }

  .hero-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-grid,
  .calendar-grid-month {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  }

  .mobile-nav {
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 34px rgba(32, 45, 38, 0.1);
  }
}

@media (max-width: 640px) {
  .main {
    padding: 20px 12px 98px;
  }

  .topbar {
    padding-inline: 3px;
  }

  .panel {
    border-radius: 17px;
  }

  .hero-panel {
    min-height: 0;
    padding: 22px 18px;
  }

  .hero-copy h2 {
    font-size: 2rem;
  }

  .calendar-overview {
    padding: 19px 15px;
  }

  .calendar-controls {
    padding: 11px;
  }

  .calendar-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-card {
    min-height: 82px;
    padding: 13px;
  }

  .calendar-grid,
  .calendar-grid-month {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-card-header {
    min-height: 70px;
    padding: 14px;
  }

  .meal-row,
  .meal-row-clickable {
    margin-inline: 8px;
  }

  .meal-row-content {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 11px;
  }

  .meal-row-media {
    width: 74px;
    height: 74px;
  }

  .meal-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meal-actions .button {
    padding-inline: 4px;
    font-size: 0.72rem;
  }

  .meal-actions .button span {
    display: none;
  }

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

  .card-actions .button {
    width: auto;
    flex: 1 1 calc(50% - 6px);
  }
}
