* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 113, 227, 0.28);
  --panel: rgba(255, 255, 255, 0.76);
  --blue: #0071e3;
  --blue-2: #0a84ff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.10);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.07);
  --radius-xl: 34px;
  --radius-lg: 24px;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(10, 132, 255, 0.18), transparent 28%),
    radial-gradient(circle at 90% 4%, rgba(175, 82, 222, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.7rem, 7vw, 6.2rem); line-height: 0.94; letter-spacing: -0.075em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 2.2rem); letter-spacing: -0.04em; margin-bottom: 8px; }
h3 { font-size: 1rem; margin-bottom: 8px; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}
textarea { resize: vertical; min-height: 240px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.10); }
button { border: 0; cursor: pointer; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(22px, calc((100vw - 1480px) / 2));
}
.glass-nav {
  background: rgba(245, 245, 247, 0.72);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  backdrop-filter: blur(24px) saturate(1.5);
}
.brand, .nav-links { display: flex; align-items: center; gap: 10px; }
.brand { font-weight: 800; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-grid; place-items: center;
  color: white;
  background: linear-gradient(135deg, #111827, #64748b);
  box-shadow: var(--shadow-soft);
}
.nav-links { gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.93rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: rgba(255, 255, 255, 0.82); }
.hero, .page-shell { width: min(1480px, calc(100vw - 36px)); margin: 0 auto; }
.product-hero { text-align: center; padding: 56px 0 18px; }
.compact-home { padding-bottom: 8px; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.74rem; font-weight: 800; margin-bottom: 10px; }
.hero-copy { max-width: 760px; margin: 0 auto 24px; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.18rem); line-height: 1.52; }
.compact-copy { max-width: 520px; }
.subtle { color: var(--muted); line-height: 1.55; }
.caption, .micro { color: var(--muted-2); font-size: 0.82rem; line-height: 1.45; }
.max-copy { max-width: 620px; }
.hero-actions, .button-row, .page-backbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-actions { justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px;
  padding: 11px 17px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 22px rgba(0, 113, 227, 0.26); }
.button.secondary, .button.tertiary { color: var(--blue); background: rgba(255,255,255,0.8); border: 1px solid rgba(0,113,227,0.14); }
.button-small { min-height: 34px; padding: 8px 13px; font-size: 0.9rem; }
.section-shell { width: min(1480px, calc(100vw - 36px)); margin: 0 auto; padding: 20px 0 90px; }
.feature-grid { display: grid; gap: 18px; }
.feature-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-grid { gap: 14px; }
.feature-tile {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.4);
  border-radius: var(--radius-xl); padding: 24px; min-height: 180px;
}
.compact-tile p { margin-bottom: 0; }
.tile-icon { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 18px; background: rgba(0,113,227,0.10); margin-bottom: 18px; font-size: 1.5rem; }
.page-shell { padding: 34px 0 70px; }
.page-hero { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding: 36px 40px; border-radius: 32px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.55)); border: 1px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-soft); }
.recipe-hero-simple { min-height: auto; }
.compact-hero h1, .inventory-hero h1, .receipt-hero h1 { font-size: clamp(2.1rem, 4.4vw, 4.5rem); max-width: 920px; }
.hero-badge { white-space: nowrap; border-radius: 999px; padding: 12px 16px; background: rgba(52,199,89,0.12); color: #15803d; font-weight: 900; }
.metrics-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card {
  border-radius: 24px; padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.55));
  border: 1px solid rgba(0,0,0,0.04);
  min-height: 112px;
}
.metric-card strong { display: block; font-size: 2rem; letter-spacing: -0.06em; }
.metric-card span { color: var(--muted); font-size: 0.88rem; }
.list-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
.inventory-page-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.receipt-layout { display: grid; grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.2fr) minmax(260px, 0.62fr); gap: 18px; align-items: start; }
.health-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(1.4);
  border-radius: var(--radius-lg); padding: 20px;
}
.sticky-panel { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: hidden; }
.detail-panel { min-height: 580px; }
.single-detail-panel { min-height: 300px; }
.list-panel, .input-panel, .detail-panel, .compact-side, .mini-panel { min-width: 0; }
.right-stack, .small-stack, .stack-list { display: grid; gap: 12px; }
.row-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.filter-grid { display: grid; gap: 10px; margin-bottom: 12px; }
.section-note { margin: 6px 0 0; max-width: 520px; }
.full-span { width: 100%; }
.stack-list { list-style: none; margin: 0; padding: 0; }
.scroll-list { overflow: auto; max-height: calc(100vh - 340px); padding-right: 4px; }
.list-button, .subcard {
  width: 100%; text-align: left; border-radius: 18px; padding: 14px;
  background: rgba(255,255,255,0.72); border: 1px solid rgba(0,0,0,0.05);
}
.list-button { display: block; }
.list-button:hover, .link-card:hover, .subcard:hover { background: white; box-shadow: var(--shadow-soft); }
.row-between { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.pill-row, .tag-cloud, .flag-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.pill, .tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 0.75rem; font-weight: 900; background: rgba(0,0,0,0.06); color: var(--muted); }
.pill.low, .tag.low, .tag.ok { color: #007aff; background: rgba(0,122,255,0.10); }
.pill.medium, .tag.medium { color: #b45309; background: rgba(255,159,10,0.16); }
.pill.high, .tag.high { color: #b91c1c; background: rgba(255,59,48,0.13); }
.pill.stock { color: #15803d; background: rgba(52,199,89,0.13); }
.empty-state { min-height: 360px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.detail-header { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.detail-title { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-list { margin: 0; padding-left: 18px; color: var(--muted); }
.mini-list li { margin-bottom: 8px; }
.ingredient-row { color: var(--ink); }
.meta-card { position: relative; }
.meta-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.meta-card-header h3 { margin-bottom: 0; }
.meta-image {
  margin: 0 0 14px;
}
.meta-image img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,0.7);
}
.meta-image-placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.5);
}
.meta-image figcaption {
  margin-top: 8px;
}
.success-text { color: #15803d; }
.error-text { color: #b91c1c; }
.ingredient-amount {
  flex: 0 0 auto;
  color: var(--ink);
  background: rgba(0,113,227,0.10);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 900;
}
pre, code { white-space: pre-wrap; word-break: break-word; }
.codebox { background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.06); border-radius: 16px; padding: 14px; max-height: 320px; overflow: auto; }
.flowchart-card { grid-column: 1 / -1; }
.flowchart-mount {
  margin-top: 12px;
  min-height: 220px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.05);
  overflow: auto;
}
.flowchart-preview {
  min-width: min-content;
}
.flowchart-preview svg {
  display: block;
  width: 100%;
  height: auto;
}
.schema-table { display: grid; gap: 8px; }
.schema-table details { background: rgba(255,255,255,0.65); border-radius: 16px; padding: 12px; }
.schema-table summary { cursor: pointer; font-weight: 900; }
.receipt-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.confidence-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,0.08); overflow: hidden; margin-top: 8px; }
.confidence-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #34c759); }
.page-backbar { margin-bottom: 14px; }
.back-link, .inline-link { color: var(--blue); font-weight: 700; }
.top-gap { margin-top: 12px; }
.schedule-hero {
  background:
    radial-gradient(circle at top right, rgba(255, 159, 10, 0.20), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.62));
}
.warm-badge {
  color: #b45309;
  background: rgba(255, 159, 10, 0.14);
}
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.schedule-main,
.schedule-slots {
  display: grid;
  gap: 18px;
}
.schedule-library-panel {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}
.selected-recipe-card {
  margin-bottom: 12px;
  border-style: dashed;
}
.schedule-library-list {
  max-height: calc(100vh - 420px);
  overflow: auto;
  padding-right: 4px;
}
.recipe-library-card {
  cursor: grab;
}
.recipe-library-card.active {
  border-color: rgba(0,113,227,0.26);
  box-shadow: 0 12px 28px rgba(0,113,227,0.12);
}
.calendar-grid {
  display: grid;
  gap: 16px;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.calendar-weekdays span {
  padding: 0 4px;
  color: var(--muted-2);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.calendar-day {
  min-height: 156px;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255,255,255,0.76);
  display: grid;
  align-content: start;
  gap: 12px;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.calendar-day:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.calendar-day.selected {
  border-color: rgba(0,113,227,0.30);
  box-shadow: 0 18px 34px rgba(0,113,227,0.12);
}
.calendar-day.today .calendar-day-number {
  color: var(--blue);
}
.calendar-day-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}
.calendar-day-number {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
}
.calendar-day-weekday {
  display: block;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.calendar-day-count,
.calendar-day-preview {
  color: var(--muted-2);
  font-size: 0.78rem;
}
.calendar-day-preview {
  display: grid;
  gap: 6px;
}
.week-section {
  display: grid;
  gap: 10px;
}
.week-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.schedule-slot-card {
  display: grid;
  gap: 14px;
}
.schedule-slot-dropzone {
  min-height: 92px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px dashed rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.62);
}
.schedule-slot-dropzone.drag-over {
  border-color: rgba(0,113,227,0.34);
  background: rgba(0,113,227,0.06);
}
.scheduled-item {
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  background: white;
  cursor: grab;
}
.schedule-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-action {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  color: var(--ink);
  font-weight: 900;
}
.slot-empty,
.compact-empty {
  min-height: 0;
  padding: 8px 0;
  color: var(--muted);
}
.pill.morning { color: #0f766e; background: rgba(45, 212, 191, 0.15); }
.pill.noon { color: #b45309; background: rgba(251, 191, 36, 0.18); }
.pill.dinner { color: #6d28d9; background: rgba(221, 214, 254, 0.28); }
.pill.snack { color: #be185d; background: rgba(251, 207, 232, 0.22); }
.recipe-search-strip {
  margin-bottom: 16px;
}
.top-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-soft);
}
.top-search-form input {
  min-height: 48px;
  border-radius: 999px;
}
.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 18px 0;
}
.recommendation-header h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 4.4vw, 4.8rem);
}
.recommendation-stack {
  display: grid;
  gap: 18px;
}
.recommendation-panel {
  overflow: hidden;
}
.recommendation-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
}
.recipe-recommendation-card {
  flex: 0 0 min(360px, 82vw);
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(0,0,0,0.05);
  scroll-snap-align: start;
}
.recipe-recommendation-card:hover {
  background: white;
  box-shadow: var(--shadow-soft);
}
.search-results-panel {
  min-height: 620px;
}
.search-results-title {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4.2vw, 4rem);
}
.recipe-search-filters {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.7fr)) auto;
  align-items: center;
}
.search-results-list {
  margin-top: 14px;
}
@media (min-width: 1241px) {
  .page-shell { padding-top: 24px; }
  .page-hero {
    padding: 28px 32px;
    margin-bottom: 14px;
  }
  .compact-hero h1, .inventory-hero h1, .receipt-hero h1 {
    font-size: clamp(2.4rem, 3.6vw, 4.2rem);
  }
  .metrics-strip { gap: 14px; }
  body[data-page="recipes"] .list-page-layout,
  body[data-page="ingredients"] .list-page-layout {
    grid-template-columns: minmax(620px, 1.45fr) minmax(300px, 0.72fr);
    gap: 22px;
  }
  body[data-page="recipes"] .list-panel,
  body[data-page="ingredients"] .list-panel {
    max-width: none;
  }
  body[data-page="inventory"] .receipt-layout,
  body[data-page="receipt"] .receipt-layout {
    grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.25fr) minmax(280px, 0.58fr);
    gap: 22px;
  }
  body[data-page="inventory"] .input-panel,
  body[data-page="receipt"] .input-panel {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    scrollbar-gutter: stable;
  }
  body[data-page="inventory"] .detail-panel,
  body[data-page="receipt"] .detail-panel {
    min-height: 680px;
  }
  body[data-page="inventory"] .compact-side,
  body[data-page="receipt"] .compact-side {
    position: sticky;
    top: 86px;
  }
  body[data-page="db-health"] .health-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
  }
  body[data-page="db-health"] .health-grid > .panel:nth-child(1) { grid-column: span 5; }
  body[data-page="db-health"] .health-grid > .panel:nth-child(2) { grid-column: span 7; }
  body[data-page="db-health"] .health-grid > .panel:nth-child(3) { grid-column: span 7; }
  body[data-page="db-health"] .health-grid > .panel:nth-child(4) { grid-column: span 5; }
  body[data-page="db-health"] .health-grid > .panel:nth-child(5) { grid-column: span 6; }
  body[data-page="db-health"] .health-grid > .panel:nth-child(6) { grid-column: span 6; }
  body[data-page="schedule"] .schedule-layout {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 22px;
  }
  body[data-page="schedule"] .schedule-main {
    grid-template-columns: 1fr;
  }
  body[data-page="schedule"] .schedule-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1240px) {
  .list-page-layout, .receipt-layout, .health-grid, .feature-grid.four, .schedule-layout, .schedule-main { grid-template-columns: 1fr; }
  .sticky-panel { position: static; max-height: none; }
  .scroll-list { max-height: none; }
  .metrics-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-library-panel { position: static; max-height: none; }
  .schedule-library-list { max-height: none; }
  .recipe-search-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  h1 { letter-spacing: -0.055em; }
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav-links { width: 100%; overflow: auto; }
  .page-hero { padding: 28px; border-radius: 28px; flex-direction: column; align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="schedule"] .page-shell {
    padding-top: 14px;
    overflow-x: hidden;
  }
  body[data-page="schedule"] .schedule-hero {
    padding: 18px 20px;
    border-radius: 22px;
    margin-bottom: 12px;
    gap: 12px;
  }
  body[data-page="schedule"] .schedule-hero h1 {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 0;
  }
  body[data-page="schedule"] .schedule-hero .subtle {
    display: none;
  }
  body[data-page="schedule"] .warm-badge {
    padding: 8px 11px;
    font-size: 0.82rem;
  }
  body[data-page="schedule"] .schedule-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  body[data-page="schedule"] .schedule-main {
    order: 1;
    gap: 12px;
    min-width: 0;
  }
  body[data-page="schedule"] .schedule-library-panel {
    order: 2;
  }
  body[data-page="schedule"] .panel {
    border-radius: 22px;
    padding: 16px;
    min-width: 0;
  }
  body[data-page="schedule"] .schedule-calendar-panel,
  body[data-page="schedule"] .calendar-grid,
  body[data-page="schedule"] .week-section {
    min-width: 0;
    overflow: hidden;
  }
  body[data-page="schedule"] .row-title {
    align-items: center;
    margin-bottom: 10px;
  }
  body[data-page="schedule"] .schedule-calendar-panel .row-title {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body[data-page="schedule"] #monthLabel {
    font-size: 1.35rem;
    line-height: 1.08;
    margin-bottom: 0;
  }
  body[data-page="schedule"] .schedule-calendar-panel .button-row {
    display: flex;
    gap: 6px;
    max-width: 330px;
    min-width: 0;
    overflow: hidden;
    width: 100%;
  }
  body[data-page="schedule"] .schedule-calendar-panel .button {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    min-height: 34px;
    padding: 7px 6px;
    font-size: 0.82rem;
  }
  body[data-page="schedule"] .week-section {
    gap: 8px;
  }
  body[data-page="schedule"] .week-section + .week-section {
    margin-top: 4px;
  }
  body[data-page="schedule"] .week-section-header {
    align-items: center;
  }
  body[data-page="schedule"] .calendar-weekdays {
    display: none;
  }
  body[data-page="schedule"] .week-days {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    max-width: 330px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  body[data-page="schedule"] .week-days::-webkit-scrollbar {
    display: none;
  }
  body[data-page="schedule"] .calendar-day {
    flex: 0 0 128px;
    min-height: 124px;
    padding: 12px;
    border-radius: 17px;
    scroll-snap-align: start;
  }
  body[data-page="schedule"] .calendar-day-number {
    font-size: 1.05rem;
  }
  body[data-page="schedule"] .calendar-day-count,
  body[data-page="schedule"] .calendar-day-preview {
    font-size: 0.76rem;
  }
  body[data-page="schedule"] .slot-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body[data-page="schedule"] .slot-quick-actions .button {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.86rem;
  }
  body[data-page="schedule"] .schedule-slots {
    gap: 10px;
  }
  body[data-page="schedule"] .schedule-slot-card {
    gap: 10px;
  }
  body[data-page="schedule"] .schedule-slot-dropzone {
    min-height: 64px;
    padding: 10px;
  }
  body[data-page="schedule"] .schedule-library-panel .section-title h2 {
    font-size: 1.35rem;
    line-height: 1.1;
  }
  body[data-page="schedule"] .selected-recipe-card {
    margin-bottom: 10px;
  }
  .calendar-weekdays,
  .calendar-grid,
  .week-days {
    gap: 8px;
  }
  .calendar-day {
    min-height: 118px;
    padding: 12px;
  }
  .recommendation-header {
    align-items: stretch;
    flex-direction: column;
  }
  .top-search-form,
  .recipe-search-filters {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .hero, .page-shell, .section-shell { width: min(100vw - 24px, 1480px); }
  .product-hero { padding-top: 44px; }
  .metrics-strip { grid-template-columns: 1fr; }
  .calendar-weekdays { display: none; }
  .week-days { grid-template-columns: 1fr; }
  .calendar-day { min-height: 0; }
}
