/* Warm kitchen palette and illustrated recipe cards. */
:root {
  --accent: #a95005;
  --accent-soft: #f9e2b6;
  --bg: #fff8eb;
  --surface: #fffdf6;
  --surface-2: #f4e9d4;
  --ink: #382c21;
  --ink-2: #74624e;
  --radius: 24px;
  --font-display: 'Trebuchet MS', ui-rounded, sans-serif;
  --max: 1180px;
  color-scheme: light;
}

/* Page rhythm and adaptive content. */
.app-main {
  padding-bottom: 120px;
}
.hero {
  padding: clamp(20px, 4vw, 48px) 0;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  max-width: 760px;
  letter-spacing: -0.045em;
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.grid {
  gap: 20px;
  margin-top: 20px;
}
.recipe-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e8d6b6;
}
.recipe-card + .recipe-card {
  margin-top: 0;
}
.recipe-card svg {
  width: 100%;
  height: 180px;
  background: #f6e7cc;
}
.card-copy {
  padding: 20px;
}
.badge {
  margin-right: 4px;
}
.detail-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  align-items: center;
  margin: 28px 0;
}
.detail-head > svg {
  width: 100%;
  max-height: 310px;
}
.detail-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.steps li {
  padding: 0 0 18px 8px;
}
figure {
  margin: 0;
}
figcaption {
  padding: 10px 0;
  font-weight: 700;
}

/* Region tokens suggest a travel atlas without depicting real boundaries. */
.region-atlas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}
.region-tile {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  min-height: 82px;
  cursor: pointer;
}
.region-tile svg {
  width: 70px;
  margin: auto;
  fill: #e8bd6a;
}
.region-tile circle {
  fill: #987241;
}
.region-tile[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.filters .row > .field {
  flex: 1;
  min-width: 130px;
}
.chip {
  min-height: 44px;
}

/* Cooking and editing keep controls comfortably touchable. */
.cook {
  margin-top: 24px;
}
.step-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.35;
  margin: 28px 0;
}
.cook-actions {
  margin: 24px 0;
}
#timers {
  position: sticky;
  bottom: 68px;
  z-index: 21;
  max-width: 720px;
  margin: auto;
}
#timers .notice {
  background: #f8dfad;
  border: 1px solid #b87f31;
  justify-content: space-between;
}
.ingredient-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.shopping-group {
  margin: 24px 0;
}
.list input:checked + span {
  text-decoration: line-through;
  opacity: 0.6;
}
.tabbar button {
  font-size: 0.85rem;
}

/* Compact discovery keeps the collection in view. */
.compact-hero {
  padding: 8px 0 18px;
}
.compact-hero h1 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin: 0;
  letter-spacing: -0.025em;
}
.region-tile svg {
  fill: var(--surface-2);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.region-tile[aria-pressed='true'] svg {
  fill: var(--accent);
}
form.stack {
  max-width: 640px;
}

/* Ingredients pair quiet measurements with clear item names. */
.ingredient-section {
  margin: 24px 0 32px;
}
.ingredients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  box-shadow: none;
  border: 1px solid var(--line);
}
.ingredient-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.ingredient-copy {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  flex: 1;
}
.quantity {
  text-align: right;
  color: var(--ink-2);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.instructions {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-bottom: 32px;
}
.instruction-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.instruction-layout > svg {
  width: 100%;
  max-height: 280px;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.instruction-layout h3 {
  font-size: 1.35rem;
  margin-bottom: 16px;
}
.round {
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}
.step-pager {
  flex-wrap: nowrap;
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* The cooking bar sits above navigation and respects the device inset. */
.recipe-open .app-main {
  padding-bottom: calc(200px + var(--safe-bottom));
}
.recipe-bar {
  position: fixed;
  bottom: calc(68px + var(--safe-bottom));
  left: 0;
  right: 0;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px max(16px, calc((100vw - 1148px) / 2));
  padding-left: max(calc(16px + var(--safe-left)), calc((100vw - 1148px) / 2));
  padding-right: max(calc(16px + var(--safe-right)), calc((100vw - 1148px) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px #382c2108;
}
.bar-title {
  flex: 1;
  min-width: 0;
}
.bar-title strong,
.bar-title span {
  display: block;
}
.bar-title span {
  font-size: 0.8rem;
}
.serving-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}
.serving-stepper input {
  width: 48px;
  padding: 8px 2px;
  text-align: center;
  appearance: textfield;
}
.serving-stepper input::-webkit-inner-spin-button {
  appearance: none;
}
.tabbar button {
  min-height: 56px;
}
.recipe-open #timers {
  bottom: calc(160px + var(--safe-bottom));
}
@media (max-width: 600px) {
  .region-atlas {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .region-tile {
    font-size: 0.7rem;
    padding: 4px;
    min-height: 72px;
  }
  .filters .row {
    gap: 8px;
  }
  .filters .row > .field {
    min-width: 100px;
  }
  .ingredients,
  .instruction-layout {
    grid-template-columns: 1fr;
  }
  .recipe-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .bar-title {
    flex-basis: 100%;
  }
  .bar-title strong {
    font-size: 0.9rem;
  }
  .recipe-bar > .primary {
    margin-left: auto;
  }
  .recipe-open .app-main {
    padding-bottom: calc(250px + var(--safe-bottom));
  }
  .recipe-open #timers {
    bottom: calc(208px + var(--safe-bottom));
  }
}
