:root {
  --cream: #f7f5e9;
  --cream-strong: #efe6d0;
  --orange: #f27922;
  --orange-dark: #c65312;
  --green: #2f9b61;
  --green-soft: #e8f7ee;
  --yellow: #f2b84b;
  --yellow-soft: #fff4cf;
  --ink: #2f241d;
  --muted: #7d6e63;
  --line: #ead7bd;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(91, 55, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 213, 133, 0.28), transparent 34rem),
    linear-gradient(180deg, var(--cream) 0%, #fbfaf2 58%, #f8f4e9 100%);
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.container {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 245, 233, 0.96);
  border-bottom: 1px solid rgba(234, 215, 189, 0.75);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
}

.header-nav a:hover,
.header-nav a.is-active {
  color: var(--orange-dark);
  background: #fff4e0;
}

.logo {
  display: inline-flex;
  align-items: center;
  width: 210px;
  height: 78px;
  overflow: hidden;
  text-decoration: none;
}

.logo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.header-inner p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.hero {
  padding: 44px 0 34px;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1.8rem, 5.8vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero p {
  max-width: 520px;
  margin: 18px 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.primary-action,
.secondary-action,
.utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 12px 20px rgba(242, 121, 34, 0.28);
}

.secondary-action {
  color: var(--orange-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-visual {
  min-height: 280px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: #f7f5e9;
  border: 1px solid rgba(234, 215, 189, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-logo-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.tool-section,
.feature-overview,
.results-section,
.about-section {
  padding: 28px 0;
}

.tool-section.tight {
  padding-top: 8px;
}

.page-hero {
  padding-top: 54px;
}

.tool-section.compact {
  padding-top: 10px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2,
.result-title-row h2,
.about-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.05;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  gap: 16px;
  max-width: 840px;
  margin: 0 auto;
}

.feature-card {
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: center;
  aspect-ratio: 1 / 1;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-card span {
  color: var(--orange-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.feature-card strong {
  font-size: 1.14rem;
}

.feature-card p {
  margin: 0;
  max-width: 220px;
  color: var(--muted);
  font-size: 0.94rem;
}

.survey-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.survey-grid {
  display: grid;
  gap: 14px;
}

.survey-group h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.today-chip {
  color: #5d493b;
  background: #fff8eb;
  border-color: #efd6b6;
}

.today-chip.is-selected {
  color: #fff;
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.survey-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0 14px;
}

.survey-summary div {
  padding: 14px;
  border-radius: 16px;
  background: #fff8eb;
  border: 1px solid #efd6b6;
}

.survey-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.survey-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.05rem;
}

.today-actions {
  margin-top: 6px;
}

.group-list {
  display: grid;
  gap: 16px;
}

.ingredient-tools {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.ingredient-tools label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.ingredient-tools input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.selected-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.selected-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.selected-panel h3,
.selected-panel p {
  margin: 0;
}

.selected-panel h3 {
  font-size: 1rem;
}

.selected-panel p {
  color: var(--muted);
  font-size: 0.92rem;
}

.selected-panel .storage-note {
  margin-top: 10px;
  font-size: 0.82rem;
}

.selected-panel-top span {
  color: var(--orange-dark);
  font-weight: 900;
}

.selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 10px 0 12px;
  color: #fff;
  background: var(--orange-dark);
  font-weight: 800;
}

.selected-chip b {
  font-size: 1rem;
  line-height: 1;
}

.ingredient-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  margin-bottom: 12px;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  text-align: left;
}

.group-title b {
  color: var(--muted);
  font-size: 0.84rem;
}

.button-cloud,
.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 15px;
  color: var(--ink);
  background: #fffaf2;
  font-weight: 750;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  transform: translateY(-1px);
}

.chip.is-selected {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.filter-chip {
  color: var(--orange-dark);
  background: #fff;
  border-style: dashed;
}

.filter-chip.is-selected {
  color: #fff;
  background: #5e6c3e;
  border-color: #5e6c3e;
}

.sub-filter {
  margin-top: 18px;
}

.sub-filter h3 {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.calorie-chip {
  color: #6d3f12;
  background: #fff6e4;
  border-color: #f0c987;
}

.calorie-chip.is-selected {
  color: #fff;
  background: #8b5e24;
  border-color: #8b5e24;
}

.actions-strip {
  padding: 12px 0 20px;
}

.actions-inner {
  display: grid;
  gap: 18px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.primary-actions .utility-button {
  min-width: 132px;
}

.reset-actions {
  padding-top: 2px;
}

.utility-button {
  color: var(--orange-dark);
  background: #fff;
  border: 1px solid var(--line);
}

.utility-button.accent {
  color: #fff;
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.utility-button.subtle {
  color: #7d6b5c;
  background: rgba(255, 255, 255, 0.72);
}

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

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.result-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.result-controls label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.result-controls select {
  min-height: 44px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 38px 0 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 750;
}

.calculator-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.calculator-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff8eb;
}

.calculator-search label {
  min-width: 44px;
  color: var(--orange-dark);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.calculator-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(234, 215, 189, 0.9);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.calculator-search-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 750;
  outline: 0;
}

.calculator-search-box span {
  margin-right: 8px;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: #f8efe2;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.calorie-search-results {
  grid-column: 2;
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow: auto;
  padding-right: 2px;
}

.calorie-search-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid rgba(234, 215, 189, 0.95);
  border-radius: 14px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
}

.calorie-search-item span,
.calorie-search-item strong,
.calorie-search-item small {
  display: block;
}

.calorie-search-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calorie-search-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.calorie-search-item b {
  color: var(--orange-dark);
  font-size: 0.86rem;
  white-space: nowrap;
}

.calorie-search-item.is-selected {
  border-color: var(--orange);
  background: #fff4e0;
}

.calorie-search-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
}

.selected-calorie-food {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  background: #fff;
}

.selected-calorie-food span,
.selected-calorie-food strong {
  display: block;
}

.selected-calorie-food span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.selected-calorie-food strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calculator-form,
.cookbook-controls {
  display: grid;
  gap: 10px;
}

.calculator-form label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.calculator-form select,
.calculator-form input,
.cookbook-controls input,
.cookbook-controls select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.calorie-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 12px;
  padding: 16px;
  border-radius: 16px;
  color: #fff;
  background: #4f6b3d;
}

.calorie-total span {
  font-weight: 800;
}

.calorie-total strong {
  font-size: 1.6rem;
}

.calorie-items {
  display: grid;
  gap: 10px;
}

.calorie-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.calorie-item strong,
.calorie-item span {
  display: block;
}

.calorie-item span {
  color: var(--muted);
  font-size: 0.85rem;
}

.calorie-item b {
  white-space: nowrap;
}

.calorie-item button {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--orange-dark);
  background: #fff4e0;
  font-weight: 800;
}

.cookbook-controls {
  margin-bottom: 18px;
}

.cookbook-count-row {
  margin-top: 14px;
}

.result-summary div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.result-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.result-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.result-block {
  margin-top: 28px;
}

.result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.count-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 850;
}

.count-pill {
  color: var(--green);
  background: var(--green-soft);
}

.count-pill.warning {
  color: #916100;
  background: var(--yellow-soft);
}

.recipe-grid {
  display: grid;
  gap: 14px;
}

.show-more-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.recipe-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.recipe-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recipe-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.badge.ready {
  color: var(--green);
  background: var(--green-soft);
}

.badge.almost {
  color: #916100;
  background: var(--yellow-soft);
}

.type-chip {
  color: #5d493b;
  background: #fff8eb;
  border-color: #efd6b6;
}

.type-chip.is-selected {
  color: #fff;
  background: #5d493b;
  border-color: #5d493b;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.meta-list span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8efe2;
  color: #5e4d3f;
  font-size: 0.82rem;
  font-weight: 700;
}

.recipe-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: #4c3b30;
  font-size: 0.94rem;
}

.recipe-detail p {
  margin: 0;
}

.recipe-detail-button {
  width: fit-content;
  min-height: 40px;
  margin-top: 4px;
}

.shopping-list-panel {
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.shopping-list-panel p {
  margin: 4px 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.shopping-list {
  display: grid;
  gap: 10px;
}

.shopping-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid #efd6b6;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.shopping-item b {
  flex: 0 0 auto;
  color: #916100;
  font-size: 0.82rem;
}

.shopping-item:hover,
.shopping-item:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 8px 22px rgba(219, 111, 43, 0.14);
}

.steps {
  margin: 6px 0 0;
  padding-left: 20px;
}

.steps li + li {
  margin-top: 4px;
}

.empty-message {
  margin: 22px 0 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.about-panel {
  padding: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.about-panel ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.about-panel li + li {
  margin-top: 8px;
}

.article-link-list a {
  color: var(--orange-dark);
  font-weight: 850;
  text-decoration: none;
}

.article-link-list a:hover {
  text-decoration: underline;
}

.article-panel {
  max-width: 860px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.article-panel h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
}

.article-panel h2 {
  margin: 28px 0 8px;
  font-size: clamp(1.2rem, 4vw, 1.55rem);
}

.article-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.article-panel p + p {
  margin-top: 10px;
}

.article-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.recipe-page-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.recipe-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 4px;
}

.recipe-page-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  color: #5e4d3f;
  background: #f8efe2;
  font-size: 0.86rem;
  font-weight: 800;
}

.legal-section {
  padding-top: 8px;
}

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

.legal-panel h2 {
  margin-top: 12px;
}

.legal-panel h2:first-child {
  margin-top: 0;
}

.legal-panel p {
  margin: 0;
  color: var(--muted);
}

.legal-updated {
  margin-top: 10px;
  font-weight: 800;
}

.contact-mail {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--orange-dark) !important;
  background: #fff4e0;
  font-weight: 900;
  text-decoration: none;
}

.contact-mail:hover {
  color: #fff !important;
  background: var(--orange-dark);
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid rgba(234, 215, 189, 0.8);
  background: rgba(255, 250, 242, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-contact {
  color: #8a7a6d;
  font-size: 0.82rem;
  font-weight: 700;
}

.footer-contact a {
  color: var(--orange-dark);
  text-decoration: none;
}

.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--orange-dark);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(47, 36, 29, 0.48);
}

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

.modal-panel {
  position: relative;
  width: min(100%, 760px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border-radius: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 80px rgba(47, 36, 29, 0.22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--orange-dark);
  background: #fff4e0;
  font-weight: 900;
}

.modal-recipe-head {
  padding-right: 72px;
}

.modal-recipe-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.modal-recipe-detail {
  margin-top: 18px;
}

body.is-modal-open {
  overflow: hidden;
}

@media (min-width: 720px) {
  .hero {
    padding: 72px 0 48px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  }

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

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

  .calculator-form {
    grid-template-columns: minmax(240px, 1fr) auto minmax(110px, 0.35fr) auto;
    align-items: end;
  }

  .calculator-form label {
    align-self: center;
  }

  .cookbook-controls {
    grid-template-columns: minmax(0, 1fr) 190px 190px;
  }

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

@media (min-width: 980px) {
  .recipe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1080px);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 96px;
    gap: 4px;
  }

  .header-nav {
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .header-nav a {
    flex: 1 1 0;
    min-height: 32px;
    padding: 0 6px;
    font-size: 0.7rem;
    text-align: center;
  }

  .logo {
    width: 150px;
    height: 54px;
  }

  .header-inner p {
    text-align: left;
    font-size: 0.84rem;
  }

  .feature-grid {
    max-width: none;
  }

  .feature-card {
    aspect-ratio: auto;
    min-height: 148px;
    justify-items: start;
    align-content: center;
    text-align: left;
  }

  .feature-card p {
    max-width: none;
  }

  .hero-visual {
    display: none;
  }

  .survey-panel,
  .selected-panel,
  .ingredient-group,
  .recipe-card,
  .calculator-panel,
  .about-panel,
  .shopping-list-panel,
  .modal-panel {
    padding: 14px;
  }

  .survey-summary {
    grid-template-columns: 1fr;
  }

  .calculator-search {
    grid-template-columns: 1fr;
  }

  .calculator-search label {
    min-width: 0;
    text-align: left;
  }

  .calorie-search-results {
    grid-column: 1;
  }

  .chip,
  .utility-button,
  .primary-action,
  .secondary-action {
    min-height: 46px;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .result-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .result-controls select {
    width: 100%;
  }

  .actions-inner,
  .actions-inner .utility-button {
    width: 100%;
  }

  .hero-actions,
  .hero-actions a {
    width: 100%;
  }

  .recipe-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-list {
    gap: 6px;
  }

  .calorie-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .calorie-item button {
    justify-content: center;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .footer-inner nav {
    justify-content: flex-start;
  }
}
