/* ==========================================================================
   饭点 · 手机菜谱原型
   设计基调：米纸底、墨绿字、番茄红印章；少一点“卡片堆叠”，多一点手写菜单感。
   ========================================================================== */

:root {
  --paper: #f4efe4;
  --paper-deep: #e9e0cf;
  --card: #fbf7ed;
  --ink: #1f2a23;
  --ink-soft: #445149;
  --muted: #7a8279;
  --line: rgba(31, 42, 35, 0.14);
  --line-strong: rgba(31, 42, 35, 0.28);
  --tomato: #ce5a42;
  --tomato-deep: #a43e2b;
  --leaf: #41624d;
  --mustard: #ce9b3f;
  --cream: #fffaf0;
  --shadow-card: 0 18px 36px -30px rgba(31, 42, 35, 0.65);
  --shadow-float: 0 16px 38px -18px rgba(31, 42, 35, 0.4);
  --font-display: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "Noto Serif SC", "STSong", serif;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --cat: #41624d;
  --cat-soft: rgba(65, 98, 77, 0.12);
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-gutter: clamp(16px, 4.2vw, 36px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.cart-open {
  overflow: hidden;
}

body:not(.is-detail) .dock-item[data-dock-home],
body.cart-open .dock-item[data-open-cart] {
  color: var(--cream);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

::selection {
  color: var(--cream);
  background: var(--tomato);
}

:focus-visible {
  outline: 2px solid var(--tomato);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.noscript {
  position: relative;
  z-index: 10;
  margin: 16px;
  padding: 14px 16px;
  border: 1px solid var(--tomato);
  border-radius: 4px 14px 4px 14px;
  color: var(--tomato-deep);
  background: var(--card);
  font-size: 12px;
}

/* 细小的纸纹：存在感要低，放大看才有颗粒。 */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: radial-gradient(rgba(31, 42, 35, 0.32) 0.55px, transparent 0.65px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(206, 155, 63, 0.12), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(206, 90, 66, 0.08), transparent 32%);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* 分类色：不只靠文字标签区分，卡片的左侧色条和图标一起变化。 */
.tone-meat {
  --cat: #b94b36;
  --cat-soft: rgba(185, 75, 54, 0.12);
}

.tone-vegetable {
  --cat: #4b6b4c;
  --cat-soft: rgba(75, 107, 76, 0.12);
}

.tone-aquatic {
  --cat: #3c7373;
  --cat-soft: rgba(60, 115, 115, 0.12);
}

.tone-staple {
  --cat: #a9772a;
  --cat-soft: rgba(169, 119, 42, 0.12);
}

.tone-soup {
  --cat: #8a5a37;
  --cat-soft: rgba(138, 90, 55, 0.12);
}

.tone-breakfast {
  --cat: #c57a2b;
  --cat-soft: rgba(197, 122, 43, 0.12);
}

.tone-dessert {
  --cat: #ad5e70;
  --cat-soft: rgba(173, 94, 112, 0.12);
}

.tone-drink {
  --cat: #4c7089;
  --cat-soft: rgba(76, 112, 137, 0.12);
}

.tone-condiment {
  --cat: #7a4c55;
  --cat-soft: rgba(122, 76, 85, 0.12);
}

.tone-semi {
  --cat: #6d7041;
  --cat-soft: rgba(109, 112, 65, 0.12);
}

.tone-template {
  --cat: #777d77;
  --cat-soft: rgba(119, 125, 119, 0.12);
}

/* ---------------------------------- 顶栏 --------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: rgba(244, 239, 228, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.topbar::after {
  content: "";
  position: absolute;
  left: var(--page-gutter);
  right: var(--page-gutter);
  bottom: 0;
  height: 1px;
  background: var(--line);
}

.topbar-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 11px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.brand-seal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 4px 10px 4px 10px;
  color: var(--cream);
  background: var(--tomato);
  border: 1px solid var(--tomato-deep);
  box-shadow: 2px 2px 0 rgba(31, 42, 35, 0.18);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-text small {
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-random {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--card);
  transition: color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.topbar-random:hover {
  color: var(--tomato-deep);
  border-color: var(--line-strong);
  transform: rotate(-4deg);
}

.topbar-random .icon {
  width: 19px;
  height: 19px;
}

.topbar-date {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cart-trigger {
  position: relative;
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  transition: transform 150ms ease, background 150ms ease;
}

.cart-trigger:hover {
  transform: translateY(-1px);
  background: var(--cream);
}

.cart-trigger .icon {
  width: 18px;
  height: 18px;
}

.cart-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--tomato);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

/* --------------------------------- 主布局 -------------------------------- */

.main {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 var(--page-gutter) calc(112px + var(--safe-bottom));
}

.view {
  min-height: 40vh;
}

.site-footer {
  margin: 48px 0 0;
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.site-footer a {
  text-underline-offset: 3px;
}

.site-footer .footer-mark {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* --------------------------------- 首页首屏 ------------------------------- */

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: end;
  gap: 14px;
  padding: clamp(22px, 5vw, 50px) 0 clamp(16px, 3vw, 24px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--tomato);
}

.hero-title {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(40px, 10.7vw, 82px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.012em;
}

.hero-title .hero-accent {
  position: relative;
  display: inline-block;
  color: var(--tomato);
}

.hero-title .hero-accent::after {
  content: "";
  position: absolute;
  left: 2px;
  right: -4px;
  bottom: 1px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.45;
  transform: rotate(-1.2deg);
}

.hero-sub {
  max-width: 34ch;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.hero-sub b {
  color: var(--tomato-deep);
  font-family: var(--font-mono);
  font-size: 0.95em;
}

.hero-mark {
  position: relative;
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50% 46% 52% 48%;
  background: rgba(251, 247, 237, 0.56);
  color: var(--leaf);
  transform: rotate(4deg);
}

.hero-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(31, 42, 35, 0.2);
  border-radius: inherit;
}

.hero-mark .hero-bowl {
  width: 55px;
  height: 55px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-stamp {
  position: absolute;
  right: -13px;
  bottom: -9px;
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--tomato);
  border-radius: 50%;
  color: var(--tomato-deep);
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.05;
  text-align: center;
  transform: rotate(9deg);
}

/* --------------------------------- 搜索框 --------------------------------- */

.search-form {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
  padding: 0 12px 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 16px 6px 16px 6px;
  background: var(--card);
  box-shadow: 4px 4px 0 rgba(31, 42, 35, 0.055);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-form:focus-within {
  border-color: var(--ink);
  box-shadow: 5px 5px 0 rgba(31, 42, 35, 0.1);
  transform: translateY(-1px);
}

.search-form .search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-input::placeholder {
  color: #8d928b;
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--paper-deep);
}

.search-clear .icon {
  width: 15px;
  height: 15px;
}

.search-key {
  display: none;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* --------------------------------- 分类条 --------------------------------- */

.filter-wrap {
  position: relative;
  margin: 10px 0 2px;
}

.chip-row {
  display: flex;
  gap: 8px;
  padding: 4px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.chip:hover {
  border-color: var(--line-strong);
  background: rgba(251, 247, 237, 0.6);
}

.chip.is-active {
  color: var(--cream);
  border-color: var(--ink);
  background: var(--ink);
}

.chip .chip-count {
  margin-left: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  opacity: 0.62;
}

.filter-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: -2px;
  bottom: 8px;
  width: 22px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--paper));
}

/* -------------------------------- 本次菜单入口 ----------------------------- */

.cook-menu-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  margin: 10px 0 2px;
  padding: 9px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px 16px 4px 16px;
  color: var(--ink);
  background: rgba(251, 247, 237, 0.7);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.cook-menu-entry:hover {
  border-style: solid;
  border-color: var(--leaf);
  background: var(--card);
  transform: translateY(-1px);
}

.cook-menu-entry-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--leaf);
  background: rgba(65, 98, 77, 0.1);
}

.cook-menu-entry-icon .icon {
  width: 20px;
  height: 20px;
}

.cook-menu-entry-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cook-menu-entry-copy strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cook-menu-entry-copy strong span {
  color: var(--tomato-deep);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.cook-menu-entry-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cook-menu-entry-arrow {
  flex: 0 0 auto;
  color: var(--leaf);
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.cook-menu-entry:hover .cook-menu-entry-arrow {
  transform: translateX(3px);
}

/* --------------------------------- 今日推荐 ------------------------------- */

.featured-wrap {
  margin: 18px 0 30px;
}

.featured-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 250, 240, 0.12);
  border-radius: 26px 7px 26px 7px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: 7px 7px 0 var(--paper-deep);
}

.featured-card::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -120px;
  top: -130px;
  border: 1px solid rgba(255, 250, 240, 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(255, 250, 240, 0.025), 0 0 0 48px rgba(255, 250, 240, 0.025);
}

.featured-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.featured-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 250, 240, 0.58);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.featured-kicker .featured-label {
  padding: 4px 7px;
  border: 1px solid rgba(206, 155, 63, 0.6);
  border-radius: 3px;
  color: var(--mustard);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.featured-title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(31px, 8vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.featured-title a {
  position: relative;
  text-decoration: none;
}

.featured-title a::after {
  content: "";
  position: absolute;
  inset: -20px;
}

.featured-desc {
  display: -webkit-box;
  max-width: 46ch;
  margin-top: 12px;
  overflow: hidden;
  color: rgba(255, 250, 240, 0.68);
  font-size: 12px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: rgba(255, 250, 240, 0.45);
  font-size: 10px;
}

.featured-meta .difficulty-dots {
  color: var(--mustard);
}

.featured-art {
  position: relative;
  z-index: 1;
  align-self: center;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 50%;
  color: var(--mustard);
  transform: rotate(5deg);
}

.featured-art .icon {
  width: 47px;
  height: 47px;
  stroke-width: 1.5;
}

.featured-actions {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 1px;
}

.featured-cta {
  min-height: 43px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink);
  background: var(--cream);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.featured-cta:hover {
  transform: translateY(-1px);
  background: #fff;
}

.featured-shuffle {
  min-height: 43px;
  color: rgba(255, 250, 240, 0.68);
  font-size: 11px;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.featured-shuffle:hover {
  color: var(--cream);
}

/* --------------------------------- 区块标题 ------------------------------- */

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.section-heading > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.section-index {
  color: var(--tomato);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.section-heading > span,
.result-count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

/* --------------------------------- 菜谱卡片 ------------------------------- */

.recipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  margin-top: 16px;
}

.recipe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 186px;
  overflow: hidden;
  padding: 16px 17px 14px;
  border: 1px solid var(--line);
  border-radius: 4px 20px 4px 20px;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  animation: card-in 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: min(calc(var(--i, 0) * 22ms), 220ms);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.recipe-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--cat);
}

.recipe-card::after {
  content: "";
  position: absolute;
  top: -38px;
  right: -32px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: var(--cat-soft);
  opacity: 0.65;
  transition: transform 220ms ease;
}

.recipe-card:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 42, 35, 0.24);
  box-shadow: 0 20px 32px -28px rgba(31, 42, 35, 0.75);
}

.recipe-card:hover::after {
  transform: scale(1.08);
}

.recipe-card:focus-visible {
  outline-offset: 4px;
}

.card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-cat {
  color: var(--cat);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.card-index {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.card-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 13px;
}

.card-copy {
  min-width: 0;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.025em;
}

.card-desc {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--cat) 28%, transparent);
  border-radius: 50% 46% 54% 48%;
  color: var(--cat);
  background: rgba(255, 250, 240, 0.45);
  transform: rotate(3deg);
}

.card-icon .icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.6;
}

.card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.card-foot .card-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted);
}

.card-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--cat);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.card-cta span {
  font-size: 13px;
  line-height: 1;
  transition: transform 160ms ease;
}

.recipe-card:hover .card-cta span {
  transform: translateX(3px);
}

.recipe-card:active {
  transform: translateY(-1px) scale(0.997);
}

.difficulty-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  vertical-align: middle;
}

.difficulty-dots i {
  display: inline-block;
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.36;
}

.difficulty-dots i.is-on {
  background: currentColor;
  opacity: 1;
}

/* --------------------------------- 空状态 --------------------------------- */

.empty-state {
  grid-column: 1 / -1;
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 42px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px 24px 6px 24px;
  text-align: center;
}

.empty-illustration {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  color: var(--muted);
}

.empty-illustration svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 0.05em;
}

.empty-state p {
  max-width: 30ch;
  margin: 8px auto 18px;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------- 按钮系统 ------------------------------- */

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

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

.button:disabled,
.text-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.button-ink {
  color: var(--cream);
  background: var(--ink);
}

.button-tomato {
  color: var(--cream);
  background: var(--tomato);
}

.button-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--card);
}

.button-outline:hover {
  border-color: var(--ink);
}

.text-button {
  min-height: 40px;
  padding: 0 2px;
  color: var(--tomato-deep);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
}

.danger-link {
  color: var(--tomato-deep);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--card);
  transition: transform 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
  transform: rotate(3deg);
  border-color: var(--line-strong);
}

.icon-button .icon {
  width: 19px;
  height: 19px;
}

/* --------------------------------- 详情页 --------------------------------- */

body.is-detail .bottom-dock,
body.is-menu .bottom-dock {
  display: none;
}

body.is-detail .main {
  padding-bottom: calc(126px + var(--safe-bottom));
}

body.is-menu .main {
  padding-bottom: calc(64px + var(--safe-bottom));
}

.detail-view {
  width: min(820px, 100%);
  margin: 0 auto;
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 5px;
}

.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.back-link .icon {
  width: 18px;
  height: 18px;
  transition: transform 150ms ease;
}

.back-link:hover .icon {
  transform: translateX(-3px);
}

.detail-top-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.detail-hero {
  position: relative;
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line);
}

.detail-hero::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 4px;
  width: 88px;
  height: 88px;
  border: 1px solid var(--cat);
  border-radius: 50%;
  opacity: 0.16;
  pointer-events: none;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cat);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.detail-kicker::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--cat);
}

.detail-title {
  position: relative;
  z-index: 1;
  max-width: 82%;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(43px, 11vw, 70px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.025em;
}

.detail-desc {
  max-width: 61ch;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 23px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-stat {
  min-width: 0;
  padding: 12px 12px 13px 0;
}

.detail-stat + .detail-stat {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.detail-stat span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.detail-stat b {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-stat b small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.detail-stat b .difficulty-dots {
  color: var(--cat);
}

.detail-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 16px;
}

.cook-menu-toggle,
.cook-menu-jump {
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--card);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.cook-menu-toggle .icon,
.cook-menu-jump .icon {
  width: 16px;
  height: 16px;
}

.cook-menu-toggle:hover,
.cook-menu-jump:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.cook-menu-toggle.is-added {
  color: var(--cream);
  border-color: var(--leaf);
  background: var(--leaf);
}

.cook-menu-toggle.is-added:hover {
  background: #34513e;
}

.cook-menu-jump {
  justify-self: end;
  border-style: dashed;
}

.cook-menu-jump > span {
  font-family: var(--font-mono);
  font-size: 10px;
}

.detail-section {
  padding-top: 30px;
}

.detail-section .section-heading {
  align-items: center;
}

.section-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.ingredient-list {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px 20px 5px 20px;
  background: var(--card);
}

.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(31, 42, 35, 0.08);
  transition: background 150ms ease;
}

.ingredient-row:last-child {
  border-bottom: 0;
}

.ingredient-row.is-added {
  background: color-mix(in srgb, var(--leaf) 5%, var(--card));
}

.ingredient-main {
  min-width: 0;
}

.ingredient-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.ingredient-detail {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.optional-tag {
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ingredient-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ingredient-amount {
  max-width: 115px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.ingredient-add {
  min-width: 66px;
  height: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.ingredient-add:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.ingredient-add .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
}

.ingredient-add.is-added {
  color: var(--cream);
  border-color: var(--leaf);
  background: var(--leaf);
}

.ingredient-add.is-added .icon {
  width: 13px;
  height: 13px;
}

.ingredient-add.is-added:hover {
  background: #34513e;
}

/* 步骤 */

.step-list {
  position: relative;
  margin-top: 19px;
}

.step-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 20px;
  left: 19px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 9px);
}

.step-group {
  position: relative;
  z-index: 1;
  margin: 18px 0 16px 52px;
}

.step-group:first-child {
  margin-top: 0;
}

.step-group span {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-soft);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 24px;
}

.step:last-child {
  padding-bottom: 8px;
}

.step-number {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cat);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 0 5px var(--paper);
}

.step-content {
  min-width: 0;
  padding-top: 4px;
}

.step-text {
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.step-notes {
  margin-top: 9px;
  padding: 9px 11px;
  border-left: 2px solid var(--mustard);
  border-radius: 0 6px 6px 0;
  background: rgba(206, 155, 63, 0.08);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.7;
  list-style: none;
}

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

.step-notes li::before {
  content: "注 ";
  color: var(--mustard);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 小贴士 */

.tips {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tips summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.tips summary::-webkit-details-marker {
  display: none;
}

.tips summary span:first-child {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tips summary small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.tips summary .tips-toggle {
  color: var(--tomato-deep);
  font-size: 11px;
  font-weight: 700;
}

.tips summary .tips-toggle::after {
  content: "展开";
}

.tips[open] summary .tips-toggle {
  color: var(--muted);
}

.tips[open] summary .tips-toggle::after {
  content: "收起";
}

.tips-body {
  padding: 2px 0 20px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.tips-body h3 {
  margin: 13px 0 4px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.tips-body p + p {
  margin-top: 7px;
}

.tips-body .tip-item {
  position: relative;
  padding-left: 13px;
}

.tips-body .tip-item::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--tomato);
  font-weight: 700;
}

.recipe-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 10px;
}

.recipe-source a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

/* 详情底部操作条 */

.detail-actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 9px var(--page-gutter) calc(9px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(244, 239, 228, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.detail-actionbar-inner {
  width: min(820px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 9px;
}

.detail-actionbar .button {
  min-height: 51px;
}

.actionbar-cart {
  position: relative;
}

.actionbar-cart .cart-count {
  min-width: 19px;
  height: 19px;
  background: var(--cream);
  color: var(--tomato-deep);
}

/* 示例数据提示 */

.sample-banner {
  margin: 16px 0 0;
  padding: 13px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  border: 1px dashed var(--mustard);
  border-radius: 4px 14px 4px 14px;
  background: rgba(206, 155, 63, 0.1);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.sample-badge {
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  background: var(--mustard);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.sample-banner code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 250, 240, 0.55);
  font-family: var(--font-mono);
  font-size: 10px;
}

.sample-banner.compact {
  margin: 12px 0 0;
}

/* --------------------------------- 底部导航 ------------------------------- */

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 50;
  width: min(500px, calc(100% - 24px));
  min-height: 66px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 250, 240, 0.08);
  border-radius: 22px;
  color: rgba(255, 250, 240, 0.6);
  background: rgba(31, 42, 35, 0.97);
  box-shadow: 0 18px 34px -16px rgba(31, 42, 35, 0.58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dock-item {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 14px;
  color: inherit;
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}

.dock-item:hover {
  color: var(--cream);
  background: rgba(255, 250, 240, 0.06);
}

.dock-item .icon {
  width: 21px;
  height: 21px;
}

.dock-icon-wrap {
  position: relative;
}

.dock-count {
  position: absolute;
  top: -7px;
  right: -12px;
  border: 1px solid var(--ink);
}

.dock-random {
  min-width: 104px;
  min-height: 49px;
  margin-top: -23px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 3px solid var(--paper);
  border-radius: 999px;
  color: var(--cream);
  background: var(--tomato);
  box-shadow: 0 11px 22px -11px rgba(164, 62, 43, 0.9);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  transition: transform 180ms ease, background 180ms ease;
}

.dock-random:hover {
  transform: translateY(-2px) rotate(-1deg);
  background: var(--tomato-deep);
}

.dock-random .icon {
  width: 18px;
  height: 18px;
}

/* --------------------------------- 本次菜单页 ----------------------------- */

.cook-menu-view {
  width: min(820px, 100%);
  margin: 0 auto;
  padding-bottom: 34px;
}

.cook-menu-hero {
  padding: 16px 0 25px;
  border-bottom: 1px solid var(--line);
}

.cook-menu-title {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 78px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.cook-menu-title-count {
  display: inline-block;
  margin-left: 4px;
  color: var(--tomato);
  font-family: var(--font-serif);
  font-size: 0.48em;
  font-weight: 700;
  vertical-align: 0.14em;
  white-space: nowrap;
}

.cook-menu-intro {
  max-width: 52ch;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.cook-menu-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0 10px;
}

.cook-menu-total {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.cook-menu-total b {
  color: var(--ink);
  font-size: 12px;
}

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

.cook-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cat);
  border-radius: 4px 18px 4px 18px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.cook-menu-item:hover {
  border-color: var(--line-strong);
  background: var(--cream);
  transform: translateY(-1px);
}

.cook-menu-item-link {
  min-width: 0;
  min-height: 74px;
  padding: 10px 3px 10px 14px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.cook-menu-number {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cat);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.cook-menu-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cook-menu-item-copy strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cook-menu-item-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cook-menu-item-arrow {
  color: var(--cat);
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.cook-menu-item-link:hover .cook-menu-item-arrow {
  transform: translateX(3px);
}

.cook-menu-remove {
  min-width: 57px;
  min-height: 44px;
  margin-right: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 650;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.cook-menu-remove:hover {
  color: var(--tomato-deep);
  border-color: rgba(206, 90, 66, 0.35);
  background: rgba(206, 90, 66, 0.08);
}

.cook-menu-empty {
  margin-top: 18px;
  padding: 38px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 5px 22px 5px 22px;
  text-align: center;
}

.cook-menu-empty .empty-illustration {
  width: 88px;
  height: 88px;
  margin: 0 auto 13px;
  color: var(--muted);
}

.cook-menu-empty h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.05em;
}

.cook-menu-empty p {
  max-width: 33ch;
  margin: 8px auto 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.cook-menu-note {
  margin-top: 24px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

/* --------------------------------- 购物清单 ------------------------------- */

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(31, 42, 35, 0.38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.cart-overlay.is-visible {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -24px 50px -20px rgba(31, 42, 35, 0.4);
  transform: translateY(105%);
  transition: transform 300ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

.cart-drawer.is-open {
  transform: translateY(0);
}

.drawer-grip {
  width: 40px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: var(--line-strong);
}

.cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.cart-head .eyebrow {
  font-size: 8px;
}

.cart-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1.1;
}

.cart-summary {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.cart-body {
  flex: 1;
  min-height: 150px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 7px 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 31px;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(31, 42, 35, 0.08);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-check {
  position: relative;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  background: transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.cart-check::after,
.cart-remove::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}

.cart-check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.cart-check[aria-checked="true"] {
  color: var(--cream);
  border-color: var(--leaf);
  background: var(--leaf);
}

.cart-copy {
  min-width: 0;
}

.cart-copy b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.45;
}

.cart-copy span {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.5;
}

.cart-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.cart-item.is-checked .cart-copy b {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cart-remove {
  position: relative;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
}

.cart-remove:hover {
  color: var(--tomato-deep);
  background: rgba(206, 90, 66, 0.08);
}

.cart-remove .icon {
  width: 14px;
  height: 14px;
}

.cart-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 30px 10px;
  text-align: center;
}

.cart-empty .empty-illustration {
  width: 78px;
  height: 78px;
  margin-bottom: 13px;
}

.cart-empty h3 {
  font-family: var(--font-serif);
  font-size: 18px;
}

.cart-empty p {
  max-width: 28ch;
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 11px;
}

.cart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px calc(13px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.cart-foot .button {
  min-height: 44px;
}

.cart-foot .text-button:disabled {
  color: var(--muted);
  opacity: 0.45;
  text-decoration: none;
  cursor: not-allowed;
}

/* --------------------------------- Toast --------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 120;
  max-width: min(360px, calc(100% - 32px));
  min-height: 45px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 999px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

body.cart-open .toast {
  top: calc(16px + env(safe-area-inset-top, 0px));
  bottom: auto;
}

.toast-message {
  font-size: 11px;
  line-height: 1.45;
}

.toast-action {
  flex: 0 0 auto;
  color: var(--mustard);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------- 打印/降级 ------------------------------- */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 520px) {
  .topbar-date {
    display: inline;
  }

  .search-key {
    display: grid;
  }

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

  .recipe-card {
    min-height: 204px;
  }

  .card-title {
    font-size: 24px;
  }

  .featured-card {
    grid-template-columns: minmax(0, 1fr) 132px;
    padding: 27px 28px;
  }

  .featured-art {
    width: 126px;
    height: 126px;
    justify-self: end;
  }

  .featured-art .icon {
    width: 61px;
    height: 61px;
  }

  .featured-desc {
    font-size: 12.5px;
  }

  .ingredient-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px 17px;
  }

  .ingredient-side {
    gap: 14px;
  }

  .ingredient-amount {
    max-width: 160px;
  }

  .detail-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 760px) {
  body {
    font-size: 15px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 145px;
    padding-top: 53px;
  }

  .hero-mark {
    width: 140px;
    height: 140px;
  }

  .hero-mark .hero-bowl {
    width: 78px;
    height: 78px;
  }

  .hero-stamp {
    width: 58px;
    height: 58px;
    right: -15px;
    bottom: -12px;
    font-size: 14px;
  }

  .hero-title {
    font-size: clamp(72px, 8.4vw, 96px);
  }

  .hero-sub {
    margin-top: 19px;
    font-size: 14px;
  }

  .search-form {
    min-height: 64px;
  }

  .search-input {
    height: 62px;
    font-size: 17px;
  }

  .featured-card {
    grid-template-columns: minmax(0, 1fr) 168px;
    padding: 32px 36px;
  }

  .featured-title {
    font-size: 48px;
  }

  .featured-desc {
    margin-top: 14px;
    font-size: 13px;
    -webkit-line-clamp: 3;
  }

  .bottom-dock {
    width: min(520px, calc(100% - 40px));
  }

  .detail-title {
    font-size: clamp(58px, 7vw, 78px);
  }

  .detail-desc {
    font-size: 14px;
  }

  .detail-stat b {
    font-size: 16px;
  }

  .step-text {
    font-size: 14.5px;
  }

  .cart-drawer {
    left: auto;
    top: 0;
    width: 430px;
    max-height: none;
    border-bottom: 1px solid var(--line);
    border-radius: 24px 0 0 24px;
    transform: translateX(105%);
  }

  .cart-drawer.is-open {
    transform: translateX(0);
  }

  .drawer-grip {
    display: none;
  }

  .cart-head {
    padding-top: 24px;
  }

  .cart-foot {
    padding-bottom: 18px;
  }
}

@media (min-width: 900px) {
  .bottom-dock {
    display: none;
  }

  .topbar-random {
    display: grid;
  }
}

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

  .recipe-card {
    min-height: 218px;
  }

  .recipe-card:hover {
    transform: translateY(-4px) rotate(-0.15deg);
  }
}

@media (max-width: 420px) {
  .topbar-date {
    display: none;
  }

  .cart-trigger-label {
    display: none;
  }

  .cart-trigger {
    width: 43px;
    padding: 0;
    justify-content: center;
  }

  .cart-trigger .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
  }

  .hero-title {
    font-size: clamp(40px, 10.7vw, 46px);
  }

  .hero-mark {
    width: 84px;
    height: 84px;
  }

  .hero-mark .hero-bowl {
    width: 48px;
    height: 48px;
  }

  .hero-stamp {
    width: 42px;
    height: 42px;
    font-size: 10px;
  }

  .featured-card {
    grid-template-columns: minmax(0, 1fr) 65px;
    padding: 19px;
  }

  .featured-title {
    font-size: 32px;
  }

  .featured-art {
    width: 65px;
    height: 65px;
  }

  .featured-art .icon {
    width: 34px;
    height: 34px;
  }

  .card-icon {
    flex-basis: 37px;
    width: 37px;
    height: 37px;
  }

  .detail-title {
    max-width: 100%;
    font-size: clamp(39px, 11vw, 51px);
  }

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

  .detail-stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .ingredient-row {
    gap: 8px;
    padding: 12px 11px;
  }

  .ingredient-amount {
    max-width: 92px;
    font-size: 9px;
  }

  .ingredient-add {
    min-width: 59px;
    padding: 0 8px;
  }

  .ingredient-add span {
    font-size: 10px;
  }

  .step {
    gap: 11px;
  }

  .step-list::before {
    left: 17px;
  }

  .step-number {
    width: 35px;
    height: 35px;
  }

  .detail-actionbar-inner {
    grid-template-columns: 1fr 1fr;
  }

  .cook-menu-entry {
    gap: 9px;
    padding: 8px 11px;
  }

  .cook-menu-entry-icon {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .cook-menu-entry-copy small {
    font-size: 10px;
  }

  .cook-menu-title {
    font-size: clamp(43px, 12vw, 54px);
  }

  .cook-menu-item-link {
    grid-template-columns: 35px minmax(0, 1fr) auto;
    gap: 9px;
    padding-left: 11px;
  }

  .cook-menu-number {
    width: 35px;
    height: 35px;
  }

  .cook-menu-item-copy strong {
    font-size: 16.5px;
  }

  .cook-menu-remove {
    min-width: 51px;
    margin-right: 7px;
    padding: 0 8px;
    font-size: 10px;
  }
}

@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;
  }
}
