:root {
  --cream: #fff8ec;
  --apricot: #f4b46c;
  --terracotta: #bb4f35;
  --wine: #54261f;
  --leaf: #68733a;
  --line: rgba(84, 38, 31, 0.2);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-gentle: cubic-bezier(0.33, 1, 0.68, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
  color: var(--wine);
  background: var(--apricot);
  font-family: "DM Sans", sans-serif;
}

body.app-booting {
  overflow: hidden;
}

.app-loader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--apricot);
  opacity: 1;
  transition: opacity 420ms var(--ease-gentle), visibility 420ms;
}

.logo-evolution {
  position: relative;
  width: min(28rem, 86vw);
  height: clamp(7rem, 22vw, 11rem);
}

.letter-form,
.tasty-final {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(6rem, 22vw, 11rem);
  line-height: 1;
  opacity: 0;
}

.letter-form {
  animation: letter-transform 360ms var(--ease-smooth) both;
}

.letter-one {
  font-family: Georgia, serif;
  font-weight: 700;
  animation-delay: 80ms;
}

.letter-two {
  font-family: "Courier New", monospace;
  font-weight: 700;
  animation-delay: 350ms;
}

.letter-three {
  font-family: Impact, Haettenschweiler, sans-serif;
  font-weight: 400;
  animation-delay: 620ms;
}

.letter-four {
  font-family: "Times New Roman", serif;
  font-style: italic;
  animation-delay: 890ms;
}

.tasty-final {
  display: flex;
  justify-content: center;
  font-family: "DM Serif Display", serif;
  font-size: clamp(4.4rem, 17vw, 8.5rem);
  animation: tasty-reveal 680ms var(--ease-smooth) 1130ms both;
}

.tasty-final b {
  font-weight: 400;
}

.tasty-final i {
  display: inline-block;
  max-width: 5em;
  overflow: hidden;
  font-style: normal;
  white-space: nowrap;
  animation: tasty-extend 620ms var(--ease-smooth) 1210ms both;
}

body.app-ready .app-loader {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes letter-transform {
  0% { opacity: 0; transform: translateY(8px) scale(0.82); filter: blur(3px); }
  35%, 72% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-5px) scale(1.06); filter: blur(2px); }
}

@keyframes tasty-reveal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes tasty-extend {
  from { max-width: 0; opacity: 0; transform: translateX(-0.08em); }
  to { max-width: 5em; opacity: 1; transform: translateX(0); }
}

body.app-mode main > section {
  display: none;
}

body.app-mode[data-active-view="home"] .hero,
body.app-mode[data-active-view="search"] #searchPage,
body.app-mode[data-active-view="recipes"] #recipes {
  display: flex;
  animation: app-view-enter 420ms var(--ease-smooth);
}

body.app-mode[data-active-view="search"] #searchPage,
body.app-mode[data-active-view="recipes"] #recipes {
  display: block;
  min-height: 100vh;
  padding-top: max(7rem, calc(5rem + env(safe-area-inset-top)));
}

body.app-mode footer {
  display: none;
}

@keyframes app-view-enter {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.app-tab-bar {
  position: fixed;
  z-index: 40;
  right: 50%;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, minmax(4.5rem, 1fr));
  width: min(31rem, calc(100% - 1.5rem));
  padding: 0.42rem;
  border: 1px solid rgba(84, 38, 31, 0.16);
  border-radius: 1.25rem;
  background: rgba(255, 248, 236, 0.9);
  box-shadow: 0 14px 42px rgba(84, 38, 31, 0.2);
  transform: translateX(50%);
  backdrop-filter: blur(18px) saturate(1.25);
}

.app-tab-bar button {
  position: relative;
  display: grid;
  min-height: 3.25rem;
  place-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.25rem;
  border: 0;
  border-radius: 0.9rem;
  color: rgba(84, 38, 31, 0.56);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: color 260ms var(--ease-gentle), background 300ms var(--ease-gentle), transform 320ms var(--ease-smooth);
}

.app-tab-bar button > span {
  font-size: 1.05rem;
  line-height: 1;
}

.app-tab-bar small {
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-tab-bar button.active {
  color: var(--wine);
  background: rgba(244, 180, 108, 0.34);
}

.app-tab-bar button:active {
  transform: scale(0.94);
}

.app-tab-bar b {
  position: absolute;
  top: 0.22rem;
  right: calc(50% - 1.2rem);
  display: grid;
  min-width: 1rem;
  height: 1rem;
  place-items: center;
  border-radius: 999px;
  color: var(--cream);
  background: var(--terracotta);
  font-size: 0.5rem;
}

main {
  background: var(--apricot);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
input,
select {
  touch-action: manipulation;
}

.site-header {
  position: absolute;
  z-index: 10;
  top: env(safe-area-inset-top, 0);
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  padding: 1.6rem clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.logo {
  width: fit-content;
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  line-height: 1;
}

.language-switch {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid rgba(84, 38, 31, 0.3);
  border-radius: 999px;
}

.header-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 0.65rem;
}

.kitchen-button,
.install-app-button,
.surprise-button,
.reset-filters-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(84, 38, 31, 0.3);
  border-radius: 999px;
  color: var(--wine);
  background: rgba(255, 248, 236, 0.42);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.install-app-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  background: var(--wine);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

body.is-installed .install-app-button {
  display: none;
}

.connection-status,
.app-toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  color: var(--cream);
  background: rgba(84, 38, 31, 0.94);
  box-shadow: 0 10px 28px rgba(84, 38, 31, 0.24);
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
}

.connection-status {
  top: max(0.75rem, env(safe-area-inset-top));
}

.app-toast {
  bottom: calc(5.8rem + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 2rem);
}

.install-sheet {
  position: fixed;
  z-index: 80;
  right: 50%;
  bottom: calc(5.9rem + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  width: min(620px, calc(100% - 1.5rem));
  padding: 0.9rem 3rem 0.9rem 0.9rem;
  border: 1px solid rgba(84, 38, 31, 0.16);
  border-radius: 1.2rem;
  background: rgba(255, 248, 236, 0.96);
  box-shadow: 0 18px 48px rgba(84, 38, 31, 0.22);
  transform: translateX(50%);
  backdrop-filter: blur(18px);
}

.install-sheet[hidden] {
  display: none;
}

.install-sheet-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.9rem;
  color: var(--cream);
  background: var(--terracotta);
  font-family: "DM Serif Display", serif;
  font-size: 1.3rem;
}

.install-sheet strong,
.install-sheet p {
  display: block;
}

.install-sheet p {
  margin: 0.2rem 0 0;
  color: rgba(84, 38, 31, 0.62);
  font-size: 0.66rem;
  line-height: 1.4;
}

.install-sheet > button:not(.install-sheet-close) {
  padding: 0.65rem 0.85rem;
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  background: var(--wine);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.install-sheet-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  color: rgba(84, 38, 31, 0.55);
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.catalog-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reset-filters-button {
  color: var(--terracotta);
  border-color: rgba(187, 79, 53, 0.35);
  background: transparent;
}

.kitchen-button b:not([hidden]) {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--terracotta);
  font-size: 0.62rem;
}

.explore {
  transition: opacity 240ms var(--ease-gentle), transform 320ms var(--ease-smooth);
}

.language-button:hover {
  opacity: 0.58;
}

.language-button {
  padding: 0.42rem 0.72rem;
  border: 0;
  border-radius: 999px;
  color: var(--wine);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 240ms var(--ease-gentle), background 240ms var(--ease-gentle), opacity 240ms var(--ease-gentle), transform 280ms var(--ease-smooth);
}

.language-button.active {
  color: var(--cream);
  background: var(--wine);
}

.language-button:active,
.filter-button:active,
.kitchen-button:active,
.surprise-button:active,
.reset-filters-button:active,
.dialog-favorite:active,
.serving-control button:active {
  transform: scale(0.96);
  transition-duration: 100ms;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 55px);
  padding: 8rem 1.25rem 5rem;
  overflow: hidden;
  text-align: center;
}

.featured {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 5rem);
  color: var(--cream);
  background: var(--wine);
}

.search-page-head {
  max-width: 1180px;
  margin: 0 auto 1.2rem;
}

.search-page-head h2 {
  margin: 0.3rem 0 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  font-weight: 400;
  line-height: 0.94;
}

.search-page-input {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  max-width: 1180px;
  margin: 2rem auto 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 248, 236, 0.28);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.08);
  transition: background 280ms var(--ease-gentle), border-color 280ms var(--ease-gentle), transform 360ms var(--ease-smooth);
}

.search-page-input:focus-within {
  border-color: rgba(255, 248, 236, 0.72);
  background: rgba(255, 248, 236, 0.13);
  transform: translateY(-2px);
}

.search-page-input input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--cream);
  background: transparent;
  font: inherit;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.search-page-input input::placeholder {
  color: rgba(255, 248, 236, 0.48);
}

.search-page-input kbd {
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(255, 248, 236, 0.24);
  border-radius: 0.35rem;
  color: rgba(255, 248, 236, 0.55);
  font: inherit;
  font-size: 0.58rem;
}

.search-history {
  max-width: 1180px;
  min-height: 4.5rem;
  margin: 0.9rem auto 4rem;
}

.search-history > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 248, 236, 0.5);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-history > div:first-child button {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

#searchHistoryList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

#searchHistoryList button {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 248, 236, 0.2);
  border-radius: 999px;
  color: rgba(255, 248, 236, 0.78);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 240ms var(--ease-gentle), background 240ms var(--ease-gentle), transform 300ms var(--ease-smooth);
}

#searchHistoryList button:hover {
  color: var(--wine);
  background: var(--cream);
  transform: translateY(-1px);
}

#searchHistoryList p {
  margin: 0;
  color: rgba(255, 248, 236, 0.36);
  font-size: 0.72rem;
}

.search-results-heading {
  margin-bottom: 1.4rem;
}

.search-results-heading h3 {
  margin: 0.3rem 0 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.search-results-grid button {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  border: 1px solid rgba(255, 248, 236, 0.2);
  border-radius: 1rem;
  color: var(--cream);
  background: rgba(255, 248, 236, 0.05);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 360ms var(--ease-smooth), background 280ms var(--ease-gentle), border-color 280ms var(--ease-gentle);
}

.search-results-grid button:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 248, 236, 0.5);
  background: rgba(255, 248, 236, 0.1);
}

.search-results-grid small { color: rgba(255, 248, 236, 0.52); }
.search-results-grid strong { margin-top: 0.8rem; font-family: "DM Serif Display", serif; font-size: 1.55rem; font-weight: 400; }
.search-results-grid span { margin-top: 0.45rem; color: rgba(255, 248, 236, 0.62); font-size: 0.76rem; line-height: 1.5; }
.search-results-grid b { margin-top: auto; padding-top: 1rem; color: var(--apricot); font-size: 0.68rem; }
.search-no-results { padding: 3rem 0; color: rgba(255, 248, 236, 0.58); }

.featured-heading {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.5fr);
  align-items: end;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto 2rem;
}

.featured-heading h2 {
  margin: 0.3rem 0 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 0.95;
}

.featured-heading > p {
  margin: 0;
  color: rgba(255, 248, 236, 0.68);
  line-height: 1.6;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 236, 0.2);
  border-radius: 1.25rem;
  background: rgba(255, 248, 236, 0.18);
}

.featured-grid article {
  --feature-accent: #d87542;
  position: relative;
  min-height: 20rem;
  padding: 2rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--feature-accent) 24%, var(--wine)), var(--wine) 75%);
}

.featured-grid article[data-country="日本"] { --feature-accent: #dda844; }
.featured-grid article[data-country="墨西哥"] { --feature-accent: #788146; }

.featured-number {
  display: block;
  color: var(--feature-accent);
  font-family: "DM Serif Display", serif;
  font-size: 3.5rem;
  line-height: 1;
}

.featured-grid p {
  margin: 2.5rem 0 0.5rem;
  color: rgba(255, 248, 236, 0.62);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-grid h3 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  font-weight: 400;
}

.featured-grid article > div {
  margin-top: 0.65rem;
  color: rgba(255, 248, 236, 0.68);
  font-size: 0.82rem;
  line-height: 1.55;
}

.featured-grid button {
  position: absolute;
  bottom: 1.6rem;
  left: 2rem;
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.65rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--cream);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.eyebrow {
  position: relative;
  z-index: 2;
  margin: 0 0 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--cream);
  font-family: "DM Serif Display", serif;
  font-size: clamp(7rem, 21vw, 18rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.68;
  text-shadow: 0 10px 45px rgba(126, 55, 36, 0.12);
}

h1 span {
  color: var(--terracotta);
}

.intro {
  position: relative;
  z-index: 2;
  margin: clamp(2.7rem, 7vw, 5rem) 0 1.6rem;
  font-family: "DM Serif Display", serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-style: italic;
}

.explore {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid currentColor;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.explore:hover {
  transform: translateX(4px);
}

.sun {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 248, 236, 0.22);
}

.sun-one {
  top: 18%;
  left: 11%;
  width: clamp(5rem, 11vw, 10rem);
  aspect-ratio: 1;
}

.sun-two {
  right: -5rem;
  bottom: 8%;
  width: clamp(12rem, 27vw, 26rem);
  aspect-ratio: 1;
}

.ingredient {
  position: absolute;
  color: rgba(84, 38, 31, 0.5);
  font-family: "DM Serif Display", serif;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.08em;
}

.ingredient::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  margin-right: 0.6rem;
  border-top: 1px solid currentColor;
  vertical-align: middle;
}

.ingredient-left {
  bottom: 16%;
  left: 6%;
  transform: rotate(-90deg);
}

.ingredient-right {
  top: 24%;
  right: 5%;
  transform: rotate(90deg);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 4vw, 4rem) calc(6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.catalog {
  padding: clamp(5rem, 9vw, 8rem) clamp(1.25rem, 6vw, 6rem);
  color: var(--wine);
  background: var(--cream);
}

.hero,
.featured,
.catalog {
  scroll-margin-top: max(1rem, env(safe-area-inset-top));
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto 3rem;
}

.catalog .eyebrow {
  margin-bottom: 0.8rem;
  color: var(--terracotta);
}

.catalog h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
}

.catalog-heading > p {
  max-width: 28rem;
  margin: 0;
  color: rgba(84, 38, 31, 0.66);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  gap: 1.4rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.recipe-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  max-width: 1180px;
  margin: 0 auto 1rem;
  padding: 0.35rem 0.45rem 0.35rem 1rem;
  border: 1px solid rgba(84, 38, 31, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: border-color 260ms var(--ease-gentle), box-shadow 320ms var(--ease-smooth), transform 320ms var(--ease-smooth);
}

.recipe-search > span {
  color: var(--terracotta);
  font-size: 1.3rem;
}

.recipe-search input {
  width: 100%;
  min-height: 2.7rem;
  border: 0;
  outline: 0;
  color: var(--wine);
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
}

.recipe-search input::placeholder {
  color: rgba(84, 38, 31, 0.48);
}

.recipe-search:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(187, 79, 53, 0.1);
  transform: translateY(-1px);
}

.recipe-search kbd {
  padding: 0.38rem 0.55rem;
  border: 0;
  border-radius: 999px;
  color: rgba(84, 38, 31, 0.62);
  background: rgba(84, 38, 31, 0.08);
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
}

.catalog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0.75rem auto 1.25rem;
}

.catalog-actions p {
  margin: 0;
  color: rgba(84, 38, 31, 0.58);
  font-size: 0.75rem;
}

.filter-group {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: 1rem;
}

.filter-label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-button {
  min-width: 3.4rem;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(84, 38, 31, 0.22);
  border-radius: 999px;
  color: var(--wine);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 240ms var(--ease-gentle), background 240ms var(--ease-gentle), transform 300ms var(--ease-smooth), box-shadow 300ms var(--ease-smooth);
}

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

.filter-button.active {
  color: var(--cream);
  background: var(--wine);
}

.filter-button:focus-visible,
.explore:focus-visible,
.language-button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.result-count {
  max-width: 1180px;
  margin: 1.6rem auto 1rem;
  color: rgba(84, 38, 31, 0.58);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 1180px;
  margin: 0 auto;
}

.recipe-card {
  --country-accent: var(--terracotta);
  position: relative;
  padding: 0.65rem 0.65rem 1.5rem;
  border-bottom: 1px solid var(--line);
  border-radius: 1rem 1rem 0 0;
  transition: background 320ms var(--ease-gentle), transform 360ms var(--ease-smooth), box-shadow 360ms var(--ease-smooth);
}

.recipe-card[data-country="美国"] { --country-accent: #86543c; }
.recipe-card[data-country="日本"] { --country-accent: #b38b34; }
.recipe-card[data-country="韩国"] { --country-accent: #8a5266; }
.recipe-card[data-country="墨西哥"] { --country-accent: #68733a; }

.recipe-card:hover {
  background: color-mix(in srgb, var(--country-accent) 7%, transparent);
}

.recipe-card .recipe-meta span:first-child {
  color: var(--country-accent);
}

.favorite-button {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 2.35rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 248, 236, 0.7);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(84, 38, 31, 0.34);
  font-size: 1.15rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

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

.recipe-card[hidden] {
  display: none;
}

.dish-art {
  display: grid;
  place-items: center;
  min-height: 15rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 50% 50% 8% 8%;
  color: rgba(255, 248, 236, 0.84);
  font-family: "DM Serif Display", serif;
  font-size: 2rem;
  box-shadow: inset 0 -44px 85px rgba(84, 38, 31, 0.18), 0 5px 0 rgba(84, 38, 31, 0.13), 0 12px 24px rgba(84, 38, 31, 0.08);
  cursor: pointer;
  transform: perspective(800px) translateY(0) rotateX(0.01deg);
  transform-origin: center bottom;
  transition: transform 420ms var(--ease-smooth), box-shadow 420ms var(--ease-smooth), filter 280ms var(--ease-gentle);
  will-change: transform;
}

.dish-art:hover {
  transform: perspective(800px) translateY(-6px) rotateX(1.5deg) scale(1.012);
  box-shadow: inset 0 -44px 85px rgba(84, 38, 31, 0.16), 0 8px 0 rgba(84, 38, 31, 0.1), 0 20px 36px rgba(84, 38, 31, 0.15);
}

.dish-art:active,
.dish-art.is-opening {
  transform: perspective(800px) translateY(1px) rotateX(-1deg) scale(0.985);
  box-shadow: inset 0 -34px 70px rgba(84, 38, 31, 0.2), 0 2px 0 rgba(84, 38, 31, 0.14), 0 7px 15px rgba(84, 38, 31, 0.09);
  filter: saturate(1.04);
}

.dish-art:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 4px;
}

.dish-art span {
  display: grid;
  place-items: center;
  width: 7rem;
  aspect-ratio: 1;
  padding: 0.5rem;
  border: 1px solid rgba(255, 248, 236, 0.6);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  text-align: center;
  transform: translateZ(12px);
  transition: transform 420ms var(--ease-smooth);
}

.dish-art:hover span {
  transform: translateY(-2px) scale(1.035);
}

.dish-art.is-opening span {
  transform: translateY(1px) scale(0.98);
}

.dish-art .dish-art-label {
  display: none;
}

.dish-art .recipe-doodle {
  position: relative;
  width: 8.4rem;
  border-color: rgba(255, 248, 236, 0.72);
  background: rgba(255, 248, 236, 0.08);
}

.dish-art .recipe-doodle::before,
.dish-art .recipe-doodle::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 2.4rem;
  height: 1.2rem;
  border-top: 2px solid rgba(255, 241, 216, 0.76);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.dish-art .recipe-doodle::before {
  top: 1.15rem;
  left: 0.75rem;
}

.dish-art .recipe-doodle::after {
  right: 0.65rem;
  bottom: 0.85rem;
  transform: rotate(155deg);
}

.doodle-vessel,
.doodle-fill,
.doodle-steam,
.doodle-accent,
.doodle-utensil,
.doodle-ground,
.doodle-rim {
  position: absolute;
}

.doodle-ground {
  z-index: 0;
  right: 50%;
  bottom: 0.72rem;
  width: 6.4rem;
  height: 1.15rem;
  border: 2px solid rgba(84, 38, 31, 0.48);
  border-radius: 50%;
  background: rgba(84, 38, 31, 0.12);
  transform: translateX(50%) rotate(-2deg);
}

.doodle-vessel {
  z-index: 2;
  right: 50%;
  bottom: 1.4rem;
  width: 5.3rem;
  height: 3.1rem;
  border: 3px solid #54261f;
  border-radius: 12% 12% 46% 46%;
  background: #fff1d8;
  transform: translateX(50%);
  outline: 1px solid rgba(84, 38, 31, 0.38);
  outline-offset: -0.45rem;
  box-shadow: inset 0 -0.42rem 0 #efc18a, 0.18rem 0.18rem 0 rgba(84, 38, 31, 0.12);
}

.doodle-fill {
  z-index: 1;
  top: -0.12rem;
  left: 0.18rem;
  width: calc(100% - 0.36rem);
  height: 1.05rem;
  border: 2px solid #54261f;
  border-radius: 50%;
  background: #e98438;
  box-shadow: inset 0 0.22rem 0 rgba(255, 248, 236, 0.3);
}

.doodle-rim {
  z-index: 7;
  top: -0.05rem;
  left: 0.18rem;
  width: calc(100% - 0.36rem);
  height: 0.7rem;
  border-top: 2px solid #54261f;
  border-radius: 50%;
  box-shadow: inset 0 0.12rem 0 rgba(255, 248, 236, 0.45);
}

.doodle-symbol {
  position: absolute;
  z-index: 4;
  right: 50%;
  top: 0.62rem;
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 2px solid #54261f;
  border-radius: 50%;
  color: #54261f;
  background: #fff7e6;
  font-family: "DM Serif Display", serif;
  font-size: 0.65rem;
  font-style: normal;
  transform: translateX(50%);
}

.doodle-accent {
  z-index: 3;
  width: 0.45rem;
  height: 0.45rem;
  border: 2px solid #54261f;
  border-radius: 50%;
  background: #f4c542;
}

.accent-one { top: 0.38rem; left: 0.7rem; }
.accent-two { top: 0.2rem; right: 0.72rem; background: #79a552; }
.accent-three { top: 1.28rem; left: 1.35rem; background: #d9573f; }

.doodle-steam {
  top: 0.7rem;
  width: 0.8rem;
  height: 2rem;
  border-left: 3px solid #fff1d8;
  border-radius: 50%;
  opacity: 0.9;
  transform: rotate(12deg);
}

.doodle-steam-one { left: 2.8rem; }
.doodle-steam-two { right: 2.55rem; top: 0.45rem; transform: rotate(-11deg); }

.doodle-utensil {
  right: 0.75rem;
  bottom: 1.25rem;
  width: 2.25rem;
  height: 0.45rem;
  border: 2px solid #54261f;
  border-radius: 999px;
  background: #f1bc74;
  transform: rotate(-35deg);
}

.doodle-snack .doodle-vessel {
  bottom: 1.55rem;
  height: 1.35rem;
  border-radius: 50%;
  box-shadow: inset 0 -0.28rem 0 #efc18a;
}

.doodle-snack .doodle-fill {
  top: -1.25rem;
  left: 0.45rem;
  width: 1.25rem;
  height: 1.65rem;
  border-radius: 45% 45% 25% 25%;
  background: #f4c542;
  box-shadow: 1.45rem 0.2rem 0 -2px #e98438, 2.9rem -0.05rem 0 -1px #f2b24f;
}

.doodle-snack .doodle-symbol { top: -0.65rem; }
.doodle-snack .doodle-steam { display: none; }

.doodle-dessert .doodle-vessel {
  bottom: 1.2rem;
  width: 4.8rem;
  height: 4.1rem;
  border-radius: 12% 55% 12% 10%;
  background: #ffe2b7;
  clip-path: polygon(0 25%, 100% 0, 82% 100%, 0 100%);
  box-shadow: inset 0 -0.55rem 0 #eaa568;
}

.doodle-dessert .doodle-fill {
  top: 0.75rem;
  left: 0.2rem;
  width: 4rem;
  height: 0.6rem;
  border-radius: 0;
  background: #d9573f;
}

.doodle-dessert .doodle-symbol { top: 1.55rem; }
.doodle-dessert .doodle-steam,
.doodle-dessert .doodle-utensil { display: none; }

.doodle-drink .doodle-vessel {
  bottom: 1.05rem;
  width: 3.6rem;
  height: 5.1rem;
  overflow: hidden;
  border-radius: 12% 12% 30% 30%;
  background: rgba(255, 247, 230, 0.62);
  box-shadow: inset 0 -2.7rem 0 rgba(239, 193, 138, 0.82);
}

.doodle-drink .doodle-fill {
  top: 2rem;
  left: 0;
  width: 100%;
  height: 1.1rem;
  border-width: 2px 0 0;
  border-radius: 0;
  background: #f4c542;
}

.doodle-drink .doodle-symbol { top: 2.55rem; }
.doodle-drink .doodle-steam { display: none; }
.doodle-drink .doodle-utensil {
  right: 2.25rem;
  bottom: 5rem;
  width: 3.6rem;
  height: 0.35rem;
  background: #79a552;
  transform: rotate(78deg);
}

.doodle-sauce .doodle-vessel {
  bottom: 1.05rem;
  width: 4.3rem;
  height: 4.75rem;
  border-radius: 14% 14% 30% 30%;
  background: #fff1d8;
  box-shadow: inset 0 -2.8rem 0 #c84935;
}

.doodle-sauce .doodle-vessel::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 0.25rem;
  width: calc(100% - 0.5rem);
  height: 0.65rem;
  border: 3px solid #54261f;
  border-radius: 999px;
  background: #efc18a;
}

.doodle-sauce .doodle-fill { display: none; }
.doodle-sauce .doodle-symbol { top: 1.8rem; }
.doodle-sauce .doodle-steam { display: none; }
.doodle-sauce .doodle-utensil { right: 1.2rem; bottom: 4.5rem; transform: rotate(-68deg); }

.food-motif,
.doodle-detail {
  position: absolute;
  z-index: 3;
  display: block;
  border: 2px solid #54261f;
  background: var(--food-one);
}

.food-motif {
  filter: drop-shadow(0.12rem 0.12rem 0 rgba(84, 38, 31, 0.12));
}

.motif-position-1 { z-index: 6; top: 0.85rem; left: 0.38rem; scale: 1.22; filter: drop-shadow(0.16rem 0.2rem 0 rgba(84, 38, 31, 0.18)); }
.motif-position-2 { z-index: 5; top: 0.72rem; right: 0.38rem; scale: 1.08; }
.motif-position-3 { z-index: 4; top: 0.32rem; left: 1.78rem; scale: 0.9; }
.motif-position-4 { z-index: 3; top: 0.08rem; right: 0.75rem; scale: 0.72; opacity: 0.9; }
.motif-position-5 { z-index: 2; top: 0.04rem; left: 0.72rem; scale: 0.58; opacity: 0.78; }

.profile-plate .motif-position-1,
.profile-snackplate .motif-position-1,
.profile-skewer .motif-position-1 { top: -0.75rem; }
.profile-plate .motif-position-2,
.profile-snackplate .motif-position-2,
.profile-skewer .motif-position-2 { top: -0.62rem; }
.profile-wrap .motif-position-1 { top: 0.65rem; left: 0.45rem; }
.profile-wrap .motif-position-2 { top: 1.55rem; right: 0.35rem; }
.profile-tallglass .motif-position-1,
.profile-mug .motif-position-1,
.profile-bottle .motif-position-1,
.profile-coupe .motif-position-1 { top: 2.15rem; left: 0.35rem; }

.motif-tofu,
.motif-cube {
  width: 1.05rem;
  height: 0.88rem;
  border-radius: 0.18rem;
  background: #fff0c2;
  transform: rotate(-7deg);
}

.motif-egg {
  width: 1.35rem;
  height: 1.05rem;
  border-radius: 55% 45% 52% 48%;
  background: #fff8df;
}

.motif-egg::after {
  content: "";
  position: absolute;
  inset: 0.2rem 0.3rem;
  border: 2px solid #54261f;
  border-radius: 50%;
  background: #f0b635;
}

.motif-noodle {
  width: 1.5rem;
  height: 1rem;
  border: 0;
  border-top: 3px solid #54261f;
  border-bottom: 3px solid #54261f;
  border-radius: 45%;
  background: transparent;
  box-shadow: inset 0 3px 0 #f1c568;
}

.motif-rice,
.motif-bean,
.motif-dot {
  width: 0.55rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #fff4cd;
  box-shadow: 0.65rem 0.22rem 0 -1px var(--food-three), 0.25rem 0.65rem 0 -1px var(--food-two);
}

.motif-leaf {
  width: 0.9rem;
  height: 1.25rem;
  border-radius: 90% 10% 80% 20%;
  background: var(--food-three);
  transform: rotate(35deg);
}

.motif-leaf::after {
  content: "";
  position: absolute;
  left: 0.38rem;
  top: 0.12rem;
  height: 0.9rem;
  border-left: 1px solid #54261f;
  transform: rotate(18deg);
}

.motif-chili {
  width: 1.55rem;
  height: 0.48rem;
  border-radius: 100% 20% 100% 20%;
  background: var(--food-two);
  transform: rotate(-18deg);
}

.motif-meat,
.motif-fish,
.motif-shrimp {
  width: 1.45rem;
  height: 0.85rem;
  border-radius: 55% 42% 58% 38%;
  background: var(--food-two);
  transform: rotate(8deg);
}

.motif-fish::after {
  content: "";
  position: absolute;
  right: -0.55rem;
  top: 0.05rem;
  border-width: 0.35rem 0.5rem 0.35rem 0;
  border-style: solid;
  border-color: transparent #54261f transparent transparent;
}

.motif-shrimp {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border-left-color: transparent;
  background: transparent;
}

.motif-berry {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #65558d;
  box-shadow: 0.48rem 0.2rem 0 -1px #7c5e9b, 0.15rem 0.52rem 0 -1px #55467d;
}

.motif-citrus {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #f2ca42;
}

.motif-citrus::after {
  content: "";
  position: absolute;
  inset: 0.18rem;
  border: 1px solid #54261f;
  border-radius: 50%;
  background: repeating-conic-gradient(transparent 0 28deg, #54261f 29deg 31deg);
}

.motif-cheese {
  width: 1.25rem;
  height: 1rem;
  clip-path: polygon(0 100%, 100% 70%, 32% 0);
  background: #f2c848;
}

.motif-bread,
.motif-potato,
.motif-chocolate {
  width: 1.25rem;
  height: 0.9rem;
  border-radius: 45% 45% 25% 25%;
  background: #d69b5c;
}

.motif-chocolate { background: #754334; }
.motif-potato { border-radius: 48% 42% 52% 38%; background: #d6ae67; }

.recipe-doodle[class*="profile-"] .doodle-symbol {
  top: auto;
  bottom: 0.28rem;
  width: 1.45rem;
  height: 1.45rem;
  background: rgba(255, 248, 236, 0.92);
}

.profile-pan .doodle-vessel {
  bottom: 1.8rem;
  width: 5.3rem;
  height: 1.6rem;
  border-radius: 18% 18% 50% 50%;
}

.profile-pan .doodle-utensil { right: 0.15rem; bottom: 2.25rem; width: 3.2rem; transform: rotate(-12deg); }

.profile-pot .doodle-vessel {
  width: 5rem;
  height: 3.7rem;
  border-radius: 18% 18% 32% 32%;
}

.profile-pot .doodle-vessel::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 0.55rem;
  width: 3.5rem;
  height: 0.55rem;
  border: 3px solid #54261f;
  border-radius: 50% 50% 10% 10%;
  background: #f0c484;
}

.profile-plate .doodle-vessel,
.profile-snackplate .doodle-vessel {
  bottom: 1.45rem;
  height: 1.25rem;
  border-radius: 50%;
}

.profile-noodle .doodle-vessel { height: 3.4rem; }
.profile-noodle .doodle-fill { background: #d89a42; }
.profile-noodle .doodle-utensil { right: 1.3rem; bottom: 4.7rem; width: 3rem; transform: rotate(-68deg); }

.profile-rice .doodle-vessel { width: 4.7rem; }
.profile-rice .doodle-fill { height: 1.35rem; background: #fff0c2; }

.profile-basket .doodle-vessel {
  height: 2.4rem;
  border-radius: 15% 15% 28% 28%;
  background: repeating-linear-gradient(45deg, #edbd77 0 5px, #d99d52 5px 8px);
}

.profile-skewer .doodle-vessel { height: 1.1rem; border-radius: 50%; }
.profile-skewer .doodle-utensil { right: 1.1rem; bottom: 3.6rem; width: 5.5rem; transform: rotate(-18deg); }

.profile-wrap .doodle-vessel {
  width: 3.4rem;
  height: 4.4rem;
  border-radius: 55% 55% 20% 20%;
  transform: translateX(50%) rotate(-8deg);
}

.profile-stack .doodle-vessel {
  height: 2.8rem;
  border-radius: 45% 45% 25% 25%;
  box-shadow: inset 0 -0.45rem 0 #d8914e, 0 -0.65rem 0 -2px #f3c675, 0 -1.25rem 0 -2px #d8914e;
}

.profile-pie .doodle-vessel {
  width: 5rem;
  height: 3.2rem;
  clip-path: polygon(0 100%, 15% 22%, 100% 0, 78% 100%);
  border-radius: 0;
}

.profile-pudding .doodle-vessel {
  width: 3.8rem;
  height: 3.9rem;
  clip-path: none;
  border-radius: 50% 50% 24% 24%;
  background: linear-gradient(#d4763f 0 22%, #f5cf76 22%);
}

.profile-cookie .doodle-vessel {
  width: 4.2rem;
  height: 4.2rem;
  clip-path: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #754334 0 0.18rem, transparent 0.2rem), radial-gradient(circle at 68% 55%, #754334 0 0.18rem, transparent 0.2rem), #e3aa62;
}

.profile-pastry .doodle-vessel {
  width: 4.8rem;
  height: 3.6rem;
  clip-path: none;
  border-radius: 55% 10% 55% 10%;
  transform: translateX(50%) rotate(-8deg);
}

.profile-tallglass .doodle-vessel { width: 3.3rem; height: 5rem; border-radius: 8% 8% 28% 28%; }
.profile-mug .doodle-vessel { width: 4rem; height: 3.9rem; border-radius: 12% 12% 28% 28%; }
.profile-mug .doodle-vessel::after { content: ""; position: absolute; right: -1.2rem; top: 0.8rem; width: 1.25rem; height: 1.6rem; border: 3px solid #54261f; border-left: 0; border-radius: 0 60% 60% 0; }
.profile-bottle .doodle-vessel,
.profile-saucebottle .doodle-vessel { width: 3rem; height: 5.2rem; border-radius: 25% 25% 18% 18%; }
.profile-coupe .doodle-vessel { width: 4.5rem; height: 2.3rem; border-radius: 50% 50% 20% 20%; }
.profile-coupe .doodle-vessel::after { content: ""; position: absolute; left: 50%; bottom: -2rem; height: 2rem; border-left: 3px solid #54261f; }

.profile-saucebowl .doodle-vessel { width: 4.8rem; height: 2.5rem; border-radius: 15% 15% 48% 48%; }
.profile-mortar .doodle-vessel { width: 4.3rem; height: 3rem; border-radius: 15% 15% 50% 50%; }
.profile-mortar .doodle-utensil { right: 1rem; bottom: 4.1rem; width: 4rem; transform: rotate(-58deg); }
.profile-saucebowl .doodle-vessel::before,
.profile-mortar .doodle-vessel::before { display: none; }

.doodle-detail {
  width: 1.4rem;
  height: 0.55rem;
  border: 0;
  border-top: 2px solid rgba(84, 38, 31, 0.72);
  border-radius: 50%;
  background: transparent;
}

.detail-one { left: 0.7rem; bottom: 1.15rem; transform: rotate(18deg); }
.detail-two { right: 0.7rem; top: 1.05rem; transform: rotate(-18deg); }
.detail-three { left: 1.15rem; top: 2.1rem; width: 0.9rem; transform: rotate(-34deg); }
.detail-four { right: 1.05rem; bottom: 1.65rem; width: 0.85rem; transform: rotate(32deg); }

.mapo-art .mapo-art-label {
  display: none;
}

.mapo-art .mapo-doodle {
  position: relative;
  width: 8.4rem;
  border-color: rgba(255, 248, 236, 0.72);
  background: rgba(255, 248, 236, 0.08);
}

.mapo-bowl {
  position: absolute;
  right: 50%;
  bottom: 1.35rem;
  width: 5.5rem;
  height: 3.25rem;
  overflow: hidden;
  border: 3px solid #54261f;
  border-top-width: 2px;
  border-radius: 12% 12% 48% 48%;
  background: #fff1d8;
  transform: translateX(50%);
  box-shadow: inset 0 -0.45rem 0 #efc18a;
}

.mapo-sauce {
  position: absolute;
  top: -0.15rem;
  left: 0.15rem;
  width: 4.85rem;
  height: 1.3rem;
  border: 2px solid #54261f;
  border-radius: 50%;
  background: #b82f20;
  box-shadow: inset 0 0.3rem 0 rgba(255, 207, 63, 0.22);
}

.tofu-cube {
  position: absolute;
  z-index: 2;
  width: 1.05rem;
  height: 0.85rem;
  border: 2px solid #54261f;
  border-radius: 0.18rem;
  background: #fff1c9;
  transform: rotate(var(--cube-rotate));
}

.tofu-cube::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 0.45rem;
  border-top: 1px solid rgba(84, 38, 31, 0.48);
  transform: rotate(-18deg);
}

.tofu-one { top: 0.25rem; left: 0.6rem; --cube-rotate: -7deg; }
.tofu-two { z-index: 1; top: 0.02rem; left: 2rem; scale: 0.74; opacity: 0.82; --cube-rotate: 5deg; }
.tofu-three { z-index: 2; top: 0.3rem; right: 0.55rem; scale: 0.9; --cube-rotate: -3deg; }
.tofu-four { z-index: 5; top: 1.08rem; left: 2.65rem; scale: 1.18; --cube-rotate: 8deg; }

.pepper-dot {
  position: absolute;
  z-index: 3;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: #54261f;
}

.pepper-one { top: 0.45rem; left: 1.8rem; }
.pepper-two { top: 1rem; right: 1.15rem; }
.pepper-three { top: 1.45rem; left: 1.25rem; }

.mapo-steam {
  position: absolute;
  top: 0.75rem;
  width: 0.85rem;
  height: 2.2rem;
  border-left: 3px solid #fff1d8;
  border-radius: 50%;
  opacity: 0.9;
  transform: rotate(13deg);
}

.steam-one { left: 2.2rem; }
.steam-two { left: 3.75rem; top: 0.45rem; transform: rotate(-10deg); }
.steam-three { right: 2rem; top: 0.9rem; }

.mapo-chili {
  position: absolute;
  right: 1.1rem;
  bottom: 1.15rem;
  width: 1.55rem;
  height: 0.5rem;
  border: 2px solid #54261f;
  border-radius: 100% 20% 100% 20%;
  background: #ffcf3f;
  transform: rotate(-24deg);
}

.mapo-chili::after {
  content: "";
  position: absolute;
  top: -0.25rem;
  right: -0.35rem;
  width: 0.55rem;
  height: 0.3rem;
  border-top: 2px solid #54261f;
  transform: rotate(35deg);
}

.art-red { background: #d84f32; }
.art-gold { background: #e4a02f; }
.art-green { background: #db7138; }
.art-brown { background: #a95535; }
.art-berry { background: #c65347; }
.art-orange { background: #e56c32; }
.art-plum { background: #b65042; }
.art-lemon { color: var(--wine); background: #efb735; }

.dish-art.temp-cold.art-red { background: #3489c8; }
.dish-art.temp-cold.art-gold { background: #36a7b5; }
.dish-art.temp-cold.art-green { background: #2b9a8f; }
.dish-art.temp-cold.art-brown { background: #527dbb; }
.dish-art.temp-cold.art-berry { background: #6d69b9; }
.dish-art.temp-cold.art-orange { background: #3d93bd; }
.dish-art.temp-cold.art-plum { background: #7667ad; }
.dish-art.temp-cold.art-lemon { color: var(--cream); background: #39a5a0; }

.recipe-meta {
  display: flex;
  justify-content: space-between;
  color: var(--terracotta);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recipe-card h3 {
  margin: 0.7rem 0 0.45rem;
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.recipe-card p {
  margin: 0;
  color: rgba(84, 38, 31, 0.65);
  font-size: 0.9rem;
  line-height: 1.65;
}

.recipe-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: min(820px, calc(100vh - 2rem));
  margin: auto;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  overflow: auto;
  border: 0;
  border-radius: 1.5rem;
  color: var(--wine);
  background: var(--cream);
  box-shadow: 0 30px 100px rgba(84, 38, 31, 0.35);
}

.user-panel,
.login-dialog {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  overflow: auto;
  border: 0;
  border-radius: 1.5rem;
  color: var(--wine);
  background: var(--cream);
  box-shadow: 0 30px 90px rgba(84, 38, 31, 0.28);
}

.recipe-dialog[open],
.user-panel[open],
.login-dialog[open] {
  animation: dialog-enter 380ms var(--ease-smooth);
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.stage-content.content-enter {
  animation: content-enter 360ms var(--ease-smooth);
}

@keyframes content-enter {
  from { opacity: 0.35; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-panel::backdrop,
.login-dialog::backdrop {
  background: rgba(84, 38, 31, 0.48);
  backdrop-filter: blur(5px);
}

.login-dialog {
  position: relative;
  width: min(440px, calc(100% - 2rem));
  padding: clamp(1.6rem, 5vw, 2.4rem);
  text-align: center;
}

.login-brand {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  place-items: center;
  border-radius: 1.15rem;
  color: var(--cream);
  background: var(--terracotta);
  font-family: "DM Serif Display", serif;
  font-size: 1.65rem;
  box-shadow: 0 12px 28px rgba(187, 79, 53, 0.24);
}

.login-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.login-dialog h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 7vw, 2.7rem);
  font-weight: 400;
}

.login-intro {
  max-width: 32rem;
  margin: 0.75rem auto 1.5rem;
  color: rgba(84, 38, 31, 0.65);
  font-size: 0.82rem;
  line-height: 1.65;
}

.login-providers {
  display: grid;
  gap: 0.7rem;
}

.login-providers button {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(84, 38, 31, 0.18);
  border-radius: 0.85rem;
  color: var(--wine);
  background: #fffaf1;
  text-align: left;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.login-providers button:hover {
  border-color: rgba(187, 79, 53, 0.45);
  background: #fffdf8;
  box-shadow: 0 8px 22px rgba(84, 38, 31, 0.08);
}

.provider-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #333;
  font-size: 0.78rem;
  font-weight: 700;
}

.google-mark { color: #4285f4; background: #fff; border: 1px solid #ddd; }
.apple-mark { color: #fff; background: #111; font-size: 0.55rem; }
.wechat-mark { background: #07c160; }

.login-status {
  min-height: 1.3rem;
  margin: 1rem 0 0;
  color: var(--terracotta);
  font-size: 0.72rem;
  line-height: 1.5;
}

.login-terms {
  margin: 0.65rem 0 0;
  color: rgba(84, 38, 31, 0.48);
  font-size: 0.64rem;
  line-height: 1.5;
}

.preference-section,
.favorites-section {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: #f6ead8;
}

.preference-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.preference-section > div,
.apply-preferences {
  grid-column: 1 / -1;
}

.preference-section label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.preference-section select {
  width: 100%;
  padding: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--wine);
  background: var(--cream);
  font: inherit;
}

.apply-preferences,
.favorites-heading button {
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 999px;
  color: var(--cream);
  background: var(--wine);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.favorites-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.favorites-heading h3 {
  margin: 0.25rem 0 0;
}

.favorites-heading button.active {
  background: var(--terracotta);
}

.favorite-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.favorite-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--wine);
  background: var(--cream);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.favorite-list small {
  color: rgba(84, 38, 31, 0.6);
}

.favorites-empty {
  padding: 1rem 0;
  color: rgba(84, 38, 31, 0.6);
  font-size: 0.82rem;
}

.recipe-dialog::backdrop {
  background: rgba(84, 38, 31, 0.52);
  backdrop-filter: blur(5px);
}

.dialog-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-kicker {
  margin: 0 0 0.45rem;
  color: var(--terracotta);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialog-top h2 {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.dialog-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.5rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--wine);
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.dialog-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
}

.dialog-favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--terracotta);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.dialog-favorite.active {
  color: var(--cream);
  border-color: var(--terracotta);
  background: var(--terracotta);
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 2rem 0;
}

.stage-tab {
  padding: 0.8rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--wine);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.stage-tab.active {
  color: var(--cream);
  background: var(--wine);
}

.stage-number {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.65rem;
  opacity: 0.65;
}

.stage-content {
  min-height: 14rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 1rem;
  background: #f6ead8;
}

.stage-content h3 {
  margin: 0 0 1rem;
  font-family: "DM Serif Display", serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.stage-content h4 {
  margin: 1.5rem 0 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.measure-list,
.step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.measure-list li,
.step-list li {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(84, 38, 31, 0.12);
  font-size: 0.9rem;
  line-height: 1.5;
}

.measure-list strong {
  float: right;
  color: var(--terracotta);
}

.interactive-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  transition: opacity 260ms var(--ease-gentle), transform 300ms var(--ease-smooth);
}

.interactive-steps li.completed {
  opacity: 0.5;
}

.interactive-steps li.completed span {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.step-check {
  display: grid;
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid rgba(187, 79, 53, 0.42);
  border-radius: 50%;
  color: var(--terracotta);
  background: transparent;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
}

.completed .step-check {
  color: var(--cream);
  background: var(--leaf);
  border-color: var(--leaf);
}

.cook-timer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  color: var(--cream);
  background: var(--wine);
}

.cook-timer small,
.cook-timer strong {
  display: block;
}

.cook-timer small {
  margin-bottom: 0.2rem;
  color: rgba(255, 248, 236, 0.62);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cook-timer strong {
  font-family: "DM Serif Display", serif;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.cook-timer > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cook-timer button {
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(255, 248, 236, 0.3);
  border-radius: 999px;
  color: var(--cream);
  background: transparent;
  font: inherit;
  font-size: 0.66rem;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cook-timer button:active {
  border-color: rgba(255, 248, 236, 0.72);
  background: rgba(255, 248, 236, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 236, 0.12);
}

.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0.2rem;
}

.ingredient-preview {
  margin-top: 0.65rem !important;
  color: rgba(84, 38, 31, 0.48) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.02em;
}

.card-facts span,
.recipe-facts span {
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  color: #59642f;
  background: rgba(104, 115, 58, 0.11);
  font-size: 0.68rem;
  font-weight: 600;
}

.recipe-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.recipe-status {
  width: fit-content;
  margin: 0 0 1.25rem;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(187, 79, 53, 0.3);
  border-radius: 0.55rem;
  color: var(--terracotta);
  background: rgba(255, 248, 236, 0.6);
  font-size: 0.72rem;
  font-weight: 600;
}

.quantity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.measure-note {
  max-width: 32rem;
  margin: 0.3rem 0 0;
  color: rgba(84, 38, 31, 0.55);
  font-size: 0.68rem;
  line-height: 1.45;
}

.quantity-heading h3 {
  margin: 0;
}

.serving-control {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.serving-control button {
  padding: 0.35rem 0.58rem;
  border: 0;
  border-radius: 999px;
  color: var(--wine);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.serving-control button.active {
  color: var(--cream);
  background: var(--wine);
}

.recipe-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.recipe-notes p {
  margin: 0;
  padding: 0.8rem;
  border-radius: 0.7rem;
  background: rgba(255, 248, 236, 0.72);
  font-size: 0.76rem;
  line-height: 1.5;
}

.recipe-notes strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--terracotta);
}

.video-source {
  margin: 0 0 1rem;
  color: rgba(84, 38, 31, 0.68);
  line-height: 1.65;
}

.source-quality {
  width: fit-content;
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #51602d;
  background: rgba(104, 115, 58, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.source-heat {
  width: fit-content;
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #8d3c29;
  background: rgba(187, 79, 53, 0.12);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

.video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: var(--cream);
  background: var(--terracotta);
  font-size: 0.82rem;
  font-weight: 600;
}

.stage-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(187, 79, 53, 0.42);
  border-radius: 0.8rem;
  color: var(--wine);
  background: rgba(255, 248, 236, 0.72);
}

.stage-tip > span {
  color: var(--terracotta);
  line-height: 1.5;
}

.stage-tip p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.stage-tip strong {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--terracotta);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related-recipes {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.related-recipes > strong {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related-recipes > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.related-recipes button {
  padding: 0.48rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--wine);
  background: var(--cream);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
}

.empty-state {
  max-width: 1180px;
  margin: 3rem auto 0;
  padding: 3rem;
  border: 1px dashed var(--line);
  text-align: center;
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .hero {
    min-height: calc(100vh - 48px);
  }

  .featured-heading {
    display: block;
  }

  .featured-heading > p {
    margin-top: 1rem;
  }

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

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

  .search-page-input kbd {
    display: none;
  }

  .featured-grid article {
    min-height: 17rem;
  }

  .quantity-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .kitchen-button > span:nth-child(2),
  .install-app-button > span:nth-child(2),
  .catalog-actions p {
    display: none;
  }

  .install-app-button {
    width: 2.35rem;
    height: 2.35rem;
    justify-content: center;
    padding: 0;
  }

  .install-sheet {
    grid-template-columns: auto 1fr;
  }

  .install-sheet > button:not(.install-sheet-close) {
    grid-column: 1 / -1;
  }

  .user-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    padding: calc(1.25rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom));
    border-radius: 0;
  }

  .preference-section {
    grid-template-columns: 1fr;
  }

  .recipe-notes {
    grid-template-columns: 1fr;
  }

  .cook-timer {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(6rem, 34vw, 10rem);
  }

  .ingredient {
    display: none;
  }

  footer span:first-child {
    display: none;
  }

  footer {
    justify-content: center;
  }

  .catalog-heading {
    display: block;
  }

  .catalog-heading > p {
    margin-top: 1.5rem;
  }

  .filter-group {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

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

  .dish-art {
    min-height: 13rem;
  }

  .stage-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .measure-list,
  .step-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .tasty-final {
    opacity: 1;
  }

  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
