:root {
  --rice: #f8f3e9;
  --paper: #fffdf8;
  --wood: #774c32;
  --wood-soft: #a87958;
  --ink: #3f392f;
  --green: #7f9170;
  --green-light: #dfe6d7;
  --red: #b85f4a;
  --line: #ded2c0;
  --nav-height: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--rice);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "PingFang SC", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 24px);
}

button, a { -webkit-tap-highlight-color: transparent; }

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  z-index: 10;
  background-image: url("/assets/images/backgrounds/paper-grain.svg");
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 530px;
  padding: max(28px, env(safe-area-inset-top)) 24px 34px;
  text-align: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero__sketches {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sketch {
  fill: none;
  stroke: var(--wood-soft);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .24;
}

.sketch--plate { fill: rgba(222, 210, 192, .12); opacity: .22; }
.sketch--cup { fill: rgba(168, 121, 88, .05); opacity: .2; }
.sketch--leaves { stroke: #879276; fill: rgba(127, 145, 112, .08); opacity: .24; }
.sketch--food { opacity: .19; }
.sketch--crumbs { fill: var(--wood-soft); stroke: none; opacity: .18; }

.hero::before {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  border: 1px solid rgba(119, 76, 50, .22);
  border-radius: 50%;
}

.hero__logo {
  position: relative;
  z-index: 1;
  width: min(60vw, 246px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
  filter: saturate(.9) contrast(.98);
}

.hero__stamp {
  position: absolute;
  top: 36px;
  right: 24px;
  width: 38px;
  padding: 6px 0;
  color: var(--red);
  border: 1px solid var(--red);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 13px;
  line-height: 1.25;
  transform: rotate(4deg);
  z-index: 2;
}

.hero__eyebrow, .section-kicker {
  margin: 0;
  color: var(--green);
  font-family: Georgia, "Yu Mincho", serif;
  font-size: 11px;
  letter-spacing: 2px;
}

.hero__eyebrow, .hero h1, .hero__wish, .hero__line {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 2px 0 6px;
  color: var(--wood);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Songti SC", serif;
  font-size: clamp(30px, 9vw, 42px);
  font-weight: 600;
  letter-spacing: 0;
}

.hero h1 span { color: var(--red); font-size: .65em; margin: 0 3px; }

.hero__wish {
  width: fit-content;
  margin: 8px auto 0;
  color: #6d6459;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Songti SC", serif;
  text-align: left;
}

.hero__wish p { margin: 0; }
.hero__wish p:first-child { margin-bottom: 5px; font-size: 12px; color: var(--wood-soft); }
.hero__wish p:last-child { padding-left: 18px; font-size: 12px; line-height: 1.7; }
.hero__wish span { color: var(--wood); font-size: 14px; }

.hero__line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 320px;
  color: var(--wood-soft);
  font-family: "Yu Mincho", serif;
  font-size: 11px;
}

.hero__line::before, .hero__line::after { content: ""; height: 1px; background: var(--line); flex: 1; }

main, .page-footer { max-width: 760px; margin: 0 auto; }

section { padding: 38px 22px; }

.intro { text-align: center; }
.intro h2, .section-heading h2 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; }
.intro h2 { margin: 5px 0 10px; color: var(--wood); font-size: 22px; }
.intro > p:last-child { margin: 0; color: #70675c; font-size: 14px; }

.categories { padding-top: 14px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin: 2px 0 0; color: var(--wood); font-size: 24px; }
.section-heading__note { color: var(--wood-soft); font-size: 11px; border-bottom: 1px solid var(--line); }

.category-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px 8px; }

.category {
  appearance: none;
  min-width: 0;
  padding: 0;
  color: #665c50;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.category span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, .7);
  color: var(--green);
  font-family: "Yu Mincho", serif;
  font-size: 20px;
  transition: background .2s, color .2s, transform .2s;
}

.category:active span { transform: scale(.94); }
.category.is-active span { color: var(--paper); background: var(--green); border-color: var(--green); }
.category.is-active { color: var(--wood); font-weight: 600; }

.recommendations { padding-top: 24px; overflow: hidden; }

.recipe-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 84%);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 22px 9px;
  margin: 0 -22px;
}
.recipe-list::-webkit-scrollbar { display: none; }

.recipe-card {
  position: relative;
  display: grid;
  grid-template-columns: 98px 1fr;
  min-height: 156px;
  overflow: hidden;
  scroll-snap-align: start;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(89, 66, 43, .06);
  text-decoration: none;
}

.recipe-card__art { display: grid; place-items: center; background: #ead1b8; }
.recipe-card__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-card__body { align-self: center; padding: 20px 16px; }
.recipe-card__body p { margin: 0; color: var(--wood-soft); font-size: 10px; letter-spacing: 1.5px; }
.recipe-card__body h3 { margin: 4px 0 15px; color: var(--wood); font-family: "Yu Mincho", serif; font-size: 21px; }
.recipe-card__tag { padding: 3px 8px; color: var(--green); background: var(--green-light); border-radius: 2px; font-size: 10px; }
.recipe-card__number { position: absolute; right: 10px; top: 7px; color: #c7b9a7; font-family: Georgia, serif; font-size: 12px; }

.swipe-hint { margin: 8px 0 0; text-align: right; color: #938778; font-size: 10px; }

.page-footer { padding: 30px 22px 45px; text-align: center; color: var(--wood-soft); }
.page-footer::before { content: "◆"; display: block; margin-bottom: 8px; color: var(--red); font-size: 8px; }
.page-footer span { font-family: Georgia, "Yu Mincho", serif; font-size: 12px; letter-spacing: 1.5px; }
.page-footer p { margin: 3px 0 0; font-family: "Yu Mincho", serif; font-size: 13px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 7px 12px env(safe-area-inset-bottom);
  background: rgba(255, 253, 248, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #8a8074; text-decoration: none; font-size: 10px; }
.nav-icon { display: grid; place-items: center; width: 28px; height: 28px; color: inherit; font-family: Arial, sans-serif; font-size: 23px; line-height: 1; }
.nav-item.is-active { color: var(--wood); font-weight: 600; }
.nav-item--order .nav-icon { width: 38px; height: 38px; margin-top: -20px; color: white; background: var(--red); border: 3px solid var(--paper); border-radius: 50%; box-shadow: 0 3px 8px rgba(120,72,55,.22); }

@media (min-width: 620px) {
  .hero { min-height: 575px; }
  .hero__logo { width: 280px; }
  .hero::before { width: 305px; height: 305px; }
  .category-list { grid-template-columns: repeat(7, 1fr); }
  .recipe-list { grid-auto-columns: 48%; }
  .bottom-nav { left: 50%; right: auto; width: min(760px, 100%); transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
