/* =============================================================
   智鲜食单 · 页面样式
   ============================================================= */

/* ------------------------------------------------------------ 顶部导航 */
.hdr {
  position: sticky; top: 0; z-index: 50;
  height: var(--hdr-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  max-width: var(--page-w); height: 100%; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}

.logo { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.logo-mark {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--c1); color: #fff;
  border-radius: 9px;
}
.logo-t { font-size: 17px; font-weight: 700; letter-spacing: .01em; }

.nav { display: flex; gap: 2px; }
.nav a {
  padding: 7px 14px; border-radius: var(--r-pill);
  font-size: var(--fs-md); color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.on { background: var(--c1-50); color: var(--c1-d); font-weight: 600; }

.sbox {
  flex: 1; min-width: 0; max-width: 440px; height: 38px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: #f2f3f5; border-radius: var(--r-pill);
  transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.sbox:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--c1-100); }
.sbox-i { width: 16px; height: 16px; color: var(--ink-3); flex: 0 0 auto; }
.sbox input { flex: 1; min-width: 0; font-size: 13.5px; }
.sbox input::placeholder { color: var(--ink-3); }
.sbox-x {
  width: 18px; height: 18px; flex: 0 0 auto;
  display: grid; place-items: center;
  position: relative;
  border-radius: 50%; background: var(--ink-3); color: #fff;
  font-size: 12px; line-height: 1;
}
/* 小图标按钮补热区：视觉尺寸不变，点击区域扩到 44px */
.sbox-x::after { content: ""; position: absolute; inset: -13px; }

.cartbtn {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px;
  background: var(--c1-btn); color: #fff;
  border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500;
  transition: background .15s var(--ease);
}
.cartbtn:hover { background: var(--c1-d); }
.cartbtn svg { width: 18px; height: 18px; }
.badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--price-d); color: #fff;
  border: 2px solid #fff; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; font-family: var(--font-num);
  animation: badge-pop .3s var(--ease);
}
@keyframes badge-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* 顶栏「全部 N 人」全局份数控制器 */
.gserv { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.gserv-l { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.gserv .stepper { height: 32px; }
@media (max-width: 760px) { .gserv { display: none; } }

/* ------------------------------------------------------------ 页面容器 */
.page { max-width: var(--page-w); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------ Banner */
.hero {
  display: grid; grid-template-columns: 1fr 440px; gap: 32px;
  align-items: center;
  margin-top: 20px; padding: 36px 40px;
  background:
    radial-gradient(120% 140% at 88% 10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, #fdf0ea 0%, #fbe3d8 46%, #fef6f2 100%);
  border: 1px solid #f6d6c9;
  border-radius: var(--r-xl);
  overflow: hidden;
}

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  background: #fff; border-radius: var(--r-pill);
  font-size: var(--fs-xs); color: var(--fresh-700); font-weight: 500;
  box-shadow: var(--sh-1);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fresh-500);
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .2);
}

.hero-l h1 {
  margin-top: 16px;
  font-size: var(--fs-hero); line-height: 1.24; font-weight: 700;
  letter-spacing: -.015em;
}
.hero-l h1 em { font-style: normal; color: var(--c1-d); }
.hero-l > p {
  margin-top: 14px; max-width: 430px;
  font-size: 15px; line-height: 1.65; color: var(--ink-2);
}
.hero-a { display: flex; gap: 10px; margin-top: 24px; }
.hero-a .btn { height: 42px; padding: 0 22px; }
.hero-a .btn-primary { box-shadow: var(--sh-pop); }

.hero-kpi { display: flex; gap: 34px; margin-top: 30px; }
.hero-kpi li { display: flex; flex-direction: column; gap: 1px; }
.hero-kpi b {
  font-family: var(--font-num); font-size: 23px; font-weight: 700;
  color: var(--ink); line-height: 1.25;
}
.hero-kpi span { font-size: var(--fs-xs); color: var(--ink-3); }

.hero-r { min-width: 0; }
.collage {
  position: relative;
  display: grid; grid-template-columns: 1.42fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  gap: 10px; height: 322px;
}
.collage figure {
  overflow: hidden; border-radius: 14px;
  background: #f0e4dd;
  box-shadow: 0 6px 18px rgba(232, 93, 58, .12);
}
.collage img { width: 100%; height: 100%; object-fit: cover; }
.coll-a { grid-row: 1 / 4; }
.coll-b, .coll-c, .coll-d { border-radius: 12px; }
.coll-card {
  position: absolute; left: -14px; bottom: 16px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, .96);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
}
.cc-k { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.cc-v { font-size: 14px; font-weight: 600; }
.cc-v b { font-family: var(--font-num); color: var(--c1-d); }
.cc-s { font-size: 11px; color: var(--ink-3); }

/* ------------------------------------------------------------ 分类栏 */
.tabs {
  position: sticky; top: var(--hdr-h); z-index: 40;
  margin-top: 18px;
  background: rgba(246, 247, 249, .95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs-in {
  max-width: var(--page-w); margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; gap: 16px;
}
.tabs-scroll {
  flex: 1; min-width: 0;
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.tabs-scroll::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 15px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: all .16s var(--ease);
}
.tab:hover { border-color: var(--ink-4); color: var(--ink); }
.tab em {
  font-style: normal; font-size: 11px; color: var(--ink-3);
  font-family: var(--font-num);
}
.tab.on {
  background: transparent; border-color: transparent;
  color: var(--c1-d); font-weight: 600;
  box-shadow: none;
}
.tab.on em { color: var(--c1); }
.tab.on::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--c1);
  transform: scaleX(0); transform-origin: center;
  animation: tabline .22s var(--ease) forwards;
}
@keyframes tabline { to { transform: scaleX(1); } }

.tabs-cnt { flex: 0 0 auto; font-size: var(--fs-sm); color: var(--ink-3); }

/* ------------------------------------------------------------ 主体布局 */
.body {
  display: block;
  padding: 22px 0 72px;
}

.sec-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.sec-h h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

.sorts {
  display: flex; gap: 2px; padding: 3px;
  background: var(--line-2); border-radius: var(--r-pill);
}
.sort {
  height: 26px; padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); color: var(--ink-3);
  transition: background .14s var(--ease), color .14s var(--ease);
}
.sort:hover { color: var(--ink); }
.sort.on {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: var(--sh-1);
}

/* ------------------------------------------------------------ 菜谱卡片 */
.grid {
  position: relative;            /* Bento 瀑布流：JS 绝对定位摆放 */
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(232, 93, 58, .14), var(--sh-2);
  border-color: var(--c1-200);
}
.card[data-on="1"] {
  border-color: var(--c1-l);
  box-shadow: 0 0 0 1px var(--c1-l), var(--sh-2);
}

.card-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: #eef1ee;
}
/* Bento：不同卡片封面高度不一，配合 JS 瀑布流形成错落网格
   封面以横向为主、整体偏矮（最大约 16:9），避免单卡图片显得“太大” */
.card[data-sz="tall"]  .card-img { aspect-ratio: 16 / 9; }
.card[data-sz="med"]   .card-img { aspect-ratio: 2 / 1; }
.card[data-sz="short"] .card-img { aspect-ratio: 21 / 9; }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .card-img img { transform: scale(1.045); }
/* 整张图片都可点：铺满封面的透明链接层，在占位图之上、加菜按钮之下 */
.card-hit {
  position: absolute; inset: 0; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.card-hit:focus-visible {
  outline: 2px solid #fff; outline-offset: -2px;
}

/* 没有菜品实拍时的封面：主料名当视觉主体，按菜系上色。
   比灰底占位更像「设计过的卡片」，也不会让人以为图片没加载完。 */
.card-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end; gap: 2px;
  padding: 16px 18px 20px;
  color: #fff;
  background:
    radial-gradient(120% 85% at 12% 8%, rgba(255, 255, 255, .26), transparent 58%),
    radial-gradient(90% 70% at 92% 96%, rgba(0, 0, 0, .18), transparent 62%),
    linear-gradient(152deg, #a48877, #7c5b48);
}
.card-ph[data-cat="荤菜"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.24), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.2), transparent 62%),
                                         linear-gradient(152deg, #ab5340, #8a3a2c); }
.card-ph[data-cat="素菜"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.24), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.2), transparent 62%),
                                         linear-gradient(152deg, #527c47, #3f6b42); }
.card-ph[data-cat="汤羹"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.26), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.18), transparent 62%),
                                         linear-gradient(152deg, #5c7f97, #3c6178); }
.card-ph[data-cat="主食"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.26), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.18), transparent 62%),
                                         linear-gradient(152deg, #a8834f, #8a6234); }
.card-ph[data-cat="凉菜"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.26), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.18), transparent 62%),
                                         linear-gradient(152deg, #5a8780, #3c6a64); }
.card-ph[data-cat="炖烧"]   { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.24), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.2), transparent 62%),
                                         linear-gradient(152deg, #a06133, #7d4526); }
.card-ph[data-cat="快手菜"] { background: radial-gradient(120% 85% at 12% 8%, rgba(255,255,255,.24), transparent 58%),
                                         radial-gradient(90% 70% at 92% 96%, rgba(0,0,0,.2), transparent 62%),
                                         linear-gradient(152deg, #786990, #574a70); }

/* 用量是估的，标一下，别让人以为是菜谱原文 */
.ing-list .est {
  display: inline-block; margin-left: 5px;
  padding: 0 4px; border-radius: 3px;
  font-style: normal; font-size: 10px; line-height: 15px;
  color: var(--orange-ink); background: var(--orange-50);
  vertical-align: 1px;
}

.card-ph b {
  font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .18);
  overflow: hidden; text-overflow: ellipsis;
}
.card-ph[data-size="md"] b { font-size: 21px; }
.card-ph[data-size="sm"] b { font-size: 17px; letter-spacing: 0; }
.card-ph i {
  font-style: normal; font-size: 12px; opacity: .78;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 封面上已经有菜名，卡片里就不再重复一遍 */
.card[data-ph="1"] .card-t { display: none; }
.card[data-ph="1"] .card-b { gap: 8px; padding-top: 12px; }
.card-img::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .22));
  opacity: 0; transition: opacity .2s var(--ease);
}
.card:hover .card-img::after { opacity: 1; }

.card-on-flag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 3px;
  height: 22px; padding: 0 9px;
  background: var(--c1-btn); color: #fff;
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 500;
  box-shadow: 0 2px 8px rgba(232, 93, 58, .3);
  animation: pop .34s var(--ease);
}

.add {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: #fff; color: var(--c1-d);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .16);
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.add::after { content: ""; position: absolute; inset: -6px; }   /* 触控热区扩到 46px */
.add svg { width: 18px; height: 18px; }
.add:hover { background: var(--c1-btn); color: #fff; transform: scale(1.06); }
.card[data-on="1"] .add { background: var(--c1-btn); color: #fff; }
.add:active { transform: scale(.9); }
.btn:active { transform: scale(.96); }

/* 点击回弹 / 数量变化弹跳 */
@keyframes pop { 0% { transform: scale(1); } 42% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.25); } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
.bump { animation: bump .34s var(--ease); }

.card-b { padding: 11px 13px 12px; display: flex; flex-direction: column; flex: 1; }
.card-t {
  font-size: 15px; font-weight: 600; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-m {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-3);
}

.card-f {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 9px; min-height: 26px;
}

.stepper {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 2px;
  border: 1px solid var(--control-line); border-radius: var(--r-pill);
  background: var(--surface-2);
}
.stepper button {
  position: relative;
  width: 23px; height: 23px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink-2); font-size: 14px; line-height: 1;
  transition: background .14s var(--ease);
}
.stepper button::after { content: ""; position: absolute; inset: -10px; }  /* 触控热区 */
.stepper button:hover:not(:disabled) { background: var(--c1-100); color: var(--c1-d); }
.stepper button:disabled { color: var(--ink-4); cursor: not-allowed; }
.stepper .sv {
  min-width: 36px; text-align: center;
  font-size: var(--fs-xs); font-family: var(--font-num); color: var(--ink);
}

.hint-sel {
  font-size: 11px; color: var(--c1-d);
  display: inline-flex; align-items: center; gap: 3px;
}

/* 空状态 */
.empty {
  grid-column: 1 / -1;
  padding: 64px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty p:first-child { font-size: 15px; font-weight: 500; }
.empty p + p { margin-top: 5px; font-size: var(--fs-sm); color: var(--ink-3); }

.gfoot {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 18px; font-size: var(--fs-xs); color: var(--ink-3);
}

/* ------------------------------------------------------------ 已选菜品（采购单内） */
.selbar { padding: 11px 18px 12px; background: var(--c1-50); border-bottom: 1px solid var(--line-2); }
.selbar-h { font-size: 11px; color: var(--c1-d); letter-spacing: .06em; }
.selchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.selchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 4px 3px 9px;
  background: #fff; border: 1px solid var(--c1-100);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); color: var(--ink-2);
}
.selchip b { font-family: var(--font-num); font-weight: 600; color: var(--c1-d); }
/* 单道菜的份数调节（原来在右侧栏，挪到菜名后面） */
.sel-sv { display: inline-flex; align-items: center; gap: 1px; }
.sel-sv button {
  position: relative;
  width: 16px; height: 16px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink-3); font-size: 12px; line-height: 1;
}
.sel-sv button::after { content: ""; position: absolute; inset: -11px; }  /* 触控热区 */
.sel-sv button:hover { background: var(--c1-100); color: var(--c1-d); }
.sel-sv b { min-width: 25px; text-align: center; }
.selchip-img {
  width: 26px; height: 26px; object-fit: cover;
  border-radius: 50%; background: #eef1ee; margin-left: -3px;
}
.sel-x {
  position: relative;
  width: 15px; height: 15px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink-3); font-size: 12px; line-height: 1;
}
.sel-x::after { content: ""; position: absolute; inset: -14px; }   /* 触控热区 */
.sel-x:hover { background: var(--price-soft); color: var(--price); }

/* 候选商品 */
.it-opts { display: grid; gap: 6px; padding: 0 14px 11px; }
.opt {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 9px;
  align-items: center; padding: 7px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  text-align: left; background: #fff;
  transition: border-color .14s var(--ease), background .14s var(--ease);
}
.opt:hover { border-color: var(--c1-l); }
.opt[data-on="1"] { border-color: var(--c1-l); background: var(--c1-50); }
.opt img, .opt .ph {
  width: 46px; height: 46px; border-radius: 6px;
  object-fit: cover; background: var(--line-2);
}
.opt-t {
  font-size: 12px; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.opt-p { text-align: right; font-family: var(--font-num); font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.opt-p small { display: block; font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }

/* 缺货行 */
.it-miss { padding: 9px 18px 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; }
.go {
  grid-column: 2; grid-row: 1 / 3; align-self: center;
  padding: 3px 10px; border: 1px solid var(--c1-100);
  border-radius: var(--r-pill);
  font-size: 11.5px; color: var(--c1-d); white-space: nowrap;
}
.go:hover { background: var(--c1-50); }

/* ------------------------------------------------------------ 页脚 */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in {
  max-width: var(--page-w); margin: 0 auto; padding: 26px 24px 30px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.foot-brand { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.foot-name { font-size: 14px; font-weight: 700; }
.foot-slogan { font-size: var(--fs-xs); color: var(--ink-3); }
.foot-meta { text-align: right; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.7; }

.foot-nav { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 2px; }
.foot-nav a { font-size: var(--fs-sm); color: var(--ink-2); transition: color .15s; }
.foot-nav a:hover { color: var(--c1-d); }

@media (max-width: 900px) {
  .foot-in { flex-direction: column; gap: 12px; padding-bottom: 84px; }
  .foot-meta { text-align: left; }
  .foot-nav { gap: 16px; }
}

/* ------------------------------------------------------------ 移动端底栏 */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: none; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(29, 33, 41, .06);
}
.mbar[data-on="1"] { display: flex; }
.mbar-l { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.mbar-t { font-size: var(--fs-xs); color: var(--ink-3); }
.mbar-t b { font-family: var(--font-num); color: var(--ink); font-size: var(--fs-md); }
.mbar-v { display: flex; align-items: baseline; color: var(--price); }
.mbar-v small { font-size: 12px; }
.mbar-v b { font-family: var(--font-num); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.mbar .btn { height: 38px; padding: 0 22px; border-radius: var(--r-pill); }
@media (min-width: 901px) { .mbar { display: none !important; } }

/* ------------------------------------------------------------ 菜谱详情共用（用料/步骤/贴士）
   正式定义在下方「菜谱整页详情」小节，这里不再重复一份。 */

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1140px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr 340px; padding: 30px; gap: 24px; }
  .collage { height: 280px; }
}

@media (max-width: 900px) {
  .page { padding: 0 16px; }
  /* 移动端把主导航折到第二行——三个入口不能藏 */
  .hdr { height: auto; }
  .hdr-in {
    height: auto; padding: 8px 16px 0; gap: 10px;
    flex-wrap: wrap;
  }
  .nav {
    display: flex; order: 20;
    width: 100%; gap: 2px;
    margin-top: 6px; padding: 2px 0;
    border-top: 1px solid var(--line);
  }
  .nav a { padding: 6px 12px; font-size: var(--fs-sm); }
  .sbox { max-width: none; }
  .cartbtn-t { display: none; }
  .cartbtn { padding: 0 12px; }
  /* 窄屏角标内收，否则贴边会把页面撑宽 */
  .badge { top: -4px; right: -2px; min-width: 18px; height: 18px; font-size: 10px; }

  .hero {
    grid-template-columns: 1fr; gap: 22px;
    padding: 24px 20px; margin-top: 14px;
  }
  .hero-r { display: none; }
  .hero-l > p { font-size: 14px; }
  .hero-kpi { gap: 26px; margin-top: 22px; }
  .hero-kpi b { font-size: 20px; }
  .hero-a .btn { flex: 1; }

  .tabs { margin-top: 12px; }
  .tabs-in { padding: 0 16px; height: 52px; gap: 10px; }
  .tabs-cnt { display: none; }

  .body { padding-bottom: 92px; }

  .grid { gap: 12px; }
  .card-b { padding: 9px 11px 11px; }
  .card-t { font-size: 14px; }
  .card-m { font-size: 11px; gap: 5px; }
  .add { width: 32px; height: 32px; right: 8px; bottom: 8px; }

  .ing-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 12px; }
  .card-img { aspect-ratio: 1 / 1; }
  .card-f { flex-direction: column; align-items: stretch; gap: 6px; }
  .stepper { width: 100%; justify-content: space-between; }
  .stepper .sv { flex: 1; }
  .hero-l h1 { font-size: 27px; }
  .hero-kpi li:nth-child(3) { display: none; }
  .gfoot { flex-direction: column; gap: 4px; }
  .it-opts { padding-left: 10px; padding-right: 10px; }
  .selbar { padding-left: 14px; padding-right: 14px; }
}

/* =============================================================
   采购单整页
   行式清单（Grocy）+ 已买分离（Mealie）+ 数字右对齐（Tandoor）
   ============================================================= */
.cp { display: none; }
body[data-view="cart"] .page { display: none; }
body[data-view="cart"] .cp { display: block; }
body[data-view="cart"] .mbar { display: none !important; }

.cp-in { max-width: var(--page-w); margin: 0 auto; padding: 26px 24px 72px; }

.cp-h {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.cp-back {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px;
  font-size: var(--fs-sm); color: var(--ink-3);
}
.cp-back:hover { color: var(--c1-d); }
.cp-hl h1, .cp-hl h2 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.cp-meta { margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-3); }
.cp-hr { display: flex; gap: 8px; }

.cp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 368px;
  gap: 20px; align-items: start; margin-top: 20px;
}
.cp-main { min-width: 0; }

/* --- 进度 --- */
.cp-prog {
  padding: 14px 18px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.cpg-t { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-2); }
.cpg-t b { font-family: var(--font-num); font-weight: 600; color: var(--c1-d); }
.cpg-bar { height: 6px; margin-top: 10px; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; }
.cpg-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c1); transition: width .3s var(--ease); }

/* --- 分组 --- */
.cp-grp {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); margin-bottom: 14px; overflow: hidden;
}
.cp-grp-h {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line-2);
}
.cp-grp-h .g-n { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.cp-grp-h .g-c { font-size: var(--fs-xs); color: var(--ink-3); }
.cp-grp-h .g-s {
  margin-left: auto; font-family: var(--font-num);
  font-size: var(--fs-md); font-weight: 600; color: var(--ink-2);
}
.cp-grp-h::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--c1-l);
}

/* --- 单行 --- */
.ci { border-bottom: 1px solid var(--line-2); }
.ci:last-child { border-bottom: 0; }
.ci-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 96px 158px 84px 62px;
  align-items: center; gap: 10px; padding: 13px 18px;
  transition: background .15s;
}
.ci-row:hover { background: var(--surface-2); }
.ci-ck {
  width: 20px; height: 20px; border: 1.5px solid var(--control-line); border-radius: 5px;
  background: var(--surface); position: relative; flex: none;
}
.ci-ck::before { content: ""; position: absolute; inset: -12px; }  /* 触控热区 */
.ci-ck:hover { border-color: var(--c1-l); }
.ci[data-done="1"] .ci-ck { background: var(--c1-btn); border-color: var(--c1-btn); }
.ci[data-done="1"] .ci-ck::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E");
}
.ci-nm { font-size: var(--fs-md); font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ci-nm:hover { color: var(--c1-d); text-decoration: underline; text-underline-offset: 3px; }
.ci-need { font-family: var(--font-num); font-size: var(--fs-sm); color: var(--ink-2); text-align: right; }
.ci-pack { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; white-space: nowrap; }
.ci-amt { font-family: var(--font-num); font-size: var(--fs-md); font-weight: 600; color: var(--price); text-align: right; }
.ci-src {
  font-size: var(--fs-xs); color: var(--ink-3); padding: 3px 8px;
  border: 1px solid var(--line); border-radius: var(--r-pill); white-space: nowrap;
}
.ci-src:hover { color: var(--c1-d); border-color: var(--c1-100); background: var(--c1-50); }
.ci-src[aria-expanded="true"] { color: var(--c1-d); border-color: var(--c1-100); background: var(--c1-50); }

.ci[data-done="1"] .ci-nm { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.ci[data-done="1"] .ci-amt { color: var(--ink-3); }

/* --- 溯源 --- */
.ci-srcs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 13px 50px; }
.cis {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 4px 9px; font-size: var(--fs-xs); color: var(--ink-2);
  background: var(--c1-50); border-radius: var(--r-pill);
}
.cis b { font-weight: 500; color: var(--c1-d); }
.cis i { font-style: normal; font-family: var(--font-num); color: var(--ink-3); }

/* --- 缺货 --- */
.ci-miss .ci-nm { color: var(--ink-2); }
.ci-miss .ci-pack a { color: var(--c1-d); font-size: var(--fs-xs); }
.ci-miss .ci-pack a:hover { text-decoration: underline; }

/* --- 侧栏 --- */
.cp-side { position: static; display: grid; gap: 14px; align-content: start; }
.cp-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px;
}
.cpc-sum { display: flex; align-items: baseline; justify-content: space-between; }
.cpc-l { font-size: var(--fs-sm); color: var(--ink-3); }
.cpc-v { font-family: var(--font-num); color: var(--price); }
.cpc-v small { font-size: 14px; margin-right: 1px; }
.cpc-v b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.cpc-stat { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 9px; }
.cpc-stat li { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--ink-3); }
.cpc-stat b { font-family: var(--font-num); font-weight: 600; color: var(--ink); }
.cpc-note { margin-top: 14px; font-size: 11px; line-height: 1.6; color: var(--ink-3); }
.cpc-h { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.cpc-h b { font-family: var(--font-num); color: var(--c1-d); }

/* --- 推荐购买（侧栏） --- */
.cp-reco { padding: 16px 14px 12px; }
.cp-reco .cpc-h { margin-bottom: 5px; }
.cpc-sub { font-size: 11px; line-height: 1.65; color: var(--ink-3); margin-bottom: 10px; }
.cp-buys { display: grid; gap: 1px; padding-bottom: 4px; }
.cpb-g {
  padding: 7px 4px 5px;
  font-size: 10.5px; letter-spacing: .06em; color: var(--ink-3);
}
.cpb-g b { font-family: var(--font-num); color: var(--c1-d); }
.cpb {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-areas:
    "img name price"
    "img desc desc";
  column-gap: 9px; row-gap: 1px; align-items: center;
  padding: 6px 4px; border-radius: var(--r-sm);
  transition: background .15s var(--ease);
}
.cpb:hover { background: var(--c1-50); }
.cpb-img {
  grid-area: img;
  display: block; width: 36px; height: 36px;
  border-radius: 7px; overflow: hidden; background: #eef1ee;
}
.cpb-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cpb-n {
  grid-area: name; min-width: 0;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cpb-d {
  grid-area: desc; min-width: 0;
  font-style: normal; font-size: 10.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cpb-p {
  grid-area: price; justify-self: end;
  display: inline-flex; align-items: center; gap: 3px;
}
.cpb-p b { font-family: var(--font-num); font-size: var(--fs-sm); font-weight: 600; color: var(--price); }
.cpb-p em {
  font-style: normal; font-size: 17px; line-height: 1; color: var(--ink-3);
  transition: transform .15s var(--ease), color .15s var(--ease);
}
.cpb:hover .cpb-p em { transform: translateX(2px); color: var(--c1-d); }
.cpb-empty { font-size: 11.5px; line-height: 1.7; color: var(--ink-3); padding: 8px 4px 10px; margin: 0; }
.cpb-empty a {
  color: var(--c1-d); font-weight: 600; margin-left: 2px;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.cpb-empty a:hover { color: var(--c1); }
.cpb-done { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.cpb-done > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  padding: 4px; font-size: 11px; color: var(--ink-3);
}
.cpb-done > summary::-webkit-details-marker { display: none; }
.cpb-done > summary b { font-family: var(--font-num); color: var(--ink-2); }
.cpb-done > summary::after { content: "展开"; margin-left: auto; font-size: 10.5px; }
.cpb-done[open] > summary::after { content: "收起"; }
.cpb-done .cpb { opacity: .5; }
.cpb-done .cpb-n { text-decoration: line-through; text-decoration-color: var(--ink-4); }

.cp-recipes { display: grid; gap: 8px; }
/* 一键把所有菜按同一个就餐人数换算 */
.cp-global {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 9px 11px; margin-bottom: 8px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs); color: var(--ink-3);
}
.cp-global button {
  height: 25px; padding: 0 9px;
  border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.cp-global button:hover { border-color: var(--c1-200); color: var(--c1-d); }
.cp-global button.on {
  background: var(--c1-d); border-color: var(--c1-d); color: #fff;
}
.cp-global-t { margin-left: auto; opacity: .72; }

/* 包装比实际用量大时提示多买多少 */
.ci-waste {
  display: inline-block; margin-left: 6px;
  padding: 0 5px; border-radius: 3px;
  font-style: normal; font-size: 11px; line-height: 16px;
  color: var(--ink-3); background: var(--line-2);
  vertical-align: 1px;
  white-space: nowrap;
}

.rchip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm);
}
.rchip-img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; background: #eef1ee; }
.rchip:not(:has(.rchip-img)) { grid-template-columns: minmax(0, 1fr) auto auto; }
.rchip-t { font-size: var(--fs-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rchip-sv { display: flex; align-items: center; gap: 2px; }
.rchip-sv button {
  position: relative;
  width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1;
  color: var(--ink-3); background: var(--surface); border: 1px solid var(--control-line);
}
.rchip-sv button::after { content: ""; position: absolute; inset: -12px; }  /* 触控热区 */
.rchip-sv button:hover { color: var(--c1-d); border-color: var(--c1-100); }
.rchip-sv span { font-family: var(--font-num); font-size: var(--fs-xs); min-width: 26px; text-align: center; color: var(--ink-2); }
.rchip-x {
  position: relative;
  width: 20px; height: 20px; border-radius: 50%; color: var(--ink-3); font-size: 15px; line-height: 1;
}
.rchip-x::after { content: ""; position: absolute; inset: -12px; }  /* 触控热区 */
.rchip-x:hover { color: var(--price); background: var(--price-soft); }

.cp-empty { padding: 72px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.cp-empty svg { margin: 0 auto 14px; color: var(--ink-4); }
.cp-empty p { color: var(--ink-3); font-size: var(--fs-sm); }
.cp-empty .ce-b { margin-top: 16px; }

/* --- 已买折叠 --- */
.cp-done { margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cp-done > summary {
  display: flex; align-items: center; gap: 8px; padding: 13px 18px;
  font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; list-style: none;
}
.cp-done > summary::-webkit-details-marker { display: none; }
.cp-done > summary b { font-family: var(--font-num); color: var(--ink); }
.cp-done > summary::after { content: "展开"; margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); }
.cp-done[open] > summary::after { content: "收起"; }
.cp-pantry-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 16px; }

/* 溯源按钮上的小三角（用 border 画，避免字符在不同字体下退化成点） */
.ci-src .cv {
  display: inline-block; width: 0; height: 0; margin-left: 4px;
  vertical-align: middle; opacity: .5;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform .2s;
}
.ci-src[aria-expanded="true"] .cv { transform: rotate(180deg); }

@media (max-width: 1140px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr) 316px; }
  .ci-row { grid-template-columns: 22px minmax(0, 1fr) 92px 112px 80px 58px; }
}
@media (max-width: 900px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); }
  /* 单列时清单在前、推荐购买在后：内嵌滚动已去掉，面板再放顶部会把主内容顶出屏幕 */
  .cp-side { order: 0; }
  .cp-in { padding: 18px 16px 48px; }
  .cp-hl h1, .cp-hl h2 { font-size: 23px; }
}
@media (max-width: 640px) {
  .ci-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas:
      "ck nm amt"
      ".  need need"
      ".  pack src";
    gap: 4px 10px; padding: 12px 14px;
  }
  .ci-ck { grid-area: ck; align-self: start; margin-top: 1px; }
  .ci-nm { grid-area: nm; }
  .ci-amt { grid-area: amt; }
  .ci-need { grid-area: need; text-align: left; }
  .ci-pack { grid-area: pack; text-align: left; }
  .ci-src { grid-area: src; justify-self: end; }
  .ci-srcs { padding-left: 14px; padding-right: 14px; }
  .cp-grp-h { padding: 11px 14px; }
  .cp-hr { width: 100%; }
  .cp-hr .btn { flex: 1; }
}

/* =============================================================
   视图切换：用 body[data-view] 决定哪个 section 显示
   ============================================================= */
.rp, .ip, .idp { display: none; }
body:not([data-view="list"]) .page { display: none; }
body[data-view="recipe"] .rp { display: block; }
body[data-view="ingredients"] .ip { display: block; }
body[data-view="ingredient"] .idp { display: block; }
body[data-view="recipe"] .mbar,
body[data-view="ingredients"] .mbar,
body[data-view="ingredient"] .mbar { display: none !important; }

/* 卡片主料 chips */
.card-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.card-chips span {
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--c1-50); color: var(--c1-d);
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
}

/* ------------------------------------------------------------ 浮动小计胶囊 */
.fbar {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 12px;
  height: 50px; padding: 0 14px 0 16px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-pill);
  box-shadow: var(--sh-3);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.fbar[hidden] { display: none; }
.fbar:hover { transform: translateY(-2px); }
.fbar-ico { width: 22px; height: 22px; color: #fff; opacity: .85; flex: 0 0 auto; }
.fbar-t { font-size: var(--fs-sm); }
.fbar-t b { font-family: var(--font-num); font-weight: 700; }
.fbar-v { display: flex; align-items: baseline; color: #fff; }
.fbar-v small { font-size: 12px; opacity: .7; }
.fbar-v b { font-family: var(--font-num); font-size: 18px; font-weight: 700; }
.fbar-go {
  padding: 7px 14px; background: var(--c1-btn); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.fbar-go:hover { background: var(--c1-d); }
@media (max-width: 900px) { .fbar { display: none !important; } }

/* =============================================================
   菜谱整页详情 #/recipe/<id>
   （食材库 #/ingredients 的样式统一放在 ing.css，此处不再重复）
   ============================================================= */
.rp-in { max-width: var(--page-w); margin: 0 auto; padding: 22px 24px 72px; }
.rp-crumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 16px;
}
.rp-crumb a { color: var(--ink-3); }
.rp-crumb a:hover { color: var(--c1-d); }
.rp-crumb b { color: var(--ink); font-weight: 600; }
.rp-crumb i { color: var(--ink-3); font-style: normal; }

.rp-hero {
  display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: start;
}
.rp-media {
  position: relative; aspect-ratio: 4/3; border-radius: var(--r-lg);
  overflow: hidden; background: var(--line-2); box-shadow: var(--sh-2);
}
.rp-media img { width: 100%; height: 100%; object-fit: cover; }
.rp-media .card-ph[data-size="hero"] b { font-size: 34px; }

.rp-info { min-width: 0; }
.rp-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.rp-info h1, .rp-info h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.rp-intro { margin-top: 10px; font-size: var(--fs-md); color: var(--ink-2); line-height: 1.7; }
.rp-kpi { display: flex; gap: 28px; margin-top: 18px; list-style: none; }
.rp-kpi li { display: flex; flex-direction: column; }
.rp-kpi b { font-family: var(--font-num); font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.rp-kpi span { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.rp-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.rp-acts-note { font-size: var(--fs-xs); color: var(--ink-3); }
.stepper-lg { height: 38px; padding: 0 4px; }
.stepper-lg .sv { min-width: 56px; font-size: var(--fs-md); }

.rp-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px;
  margin-top: 28px; align-items: start;
}
.rp-main { min-width: 0; }
.blk {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 16px;
}
/* 菜谱详情的区块标题比食材详情略大一档（.blk-h 基准定义在 ing.css） */
.rp-main .blk-h { margin-bottom: 12px; }
.rp-main .blk-h h2 { font-size: var(--fs-lg); }
.rp-main .blk-h span { font-size: var(--fs-xs); }
.rp-side .note-card { margin-bottom: 16px; }

.ing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 26px; }
.ing-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: var(--fs-md); }
.ing-list li.keep { color: var(--ink-3); }
.ing-list .n a { color: var(--c1-d); }
.ing-list .n a:hover { text-decoration: underline; }
.ing-list .a { font-family: var(--font-num); color: var(--ink-2); white-space: nowrap; }
.steps { display: grid; gap: 12px; counter-reset: st; list-style: none; }
.steps li { position: relative; padding-left: 32px; font-size: var(--fs-md); line-height: 1.75; color: var(--ink-2); }
.steps li::before {
  counter-increment: st; content: counter(st);
  position: absolute; left: 0; top: 3px; width: 22px; height: 22px;
  display: grid; place-items: center; background: var(--c1-50); color: var(--c1-d);
  border-radius: 50%; font-size: 11px; font-weight: 600; font-family: var(--font-num);
}
.steps li.none { color: var(--ink-3); }
.tips { margin-top: 16px; padding: 12px 16px; background: var(--orange-50); border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: 1.7; color: #8a5a00; }
.tips b { font-weight: 600; margin-right: 6px; }

.sim-list { display: grid; gap: 2px; }
.sim-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); transition: background .15s; }
.sim-list a:hover { background: var(--surface-2); }
.sim-t { font-size: var(--fs-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-m { font-size: var(--fs-xs); color: var(--ink-3); font-family: var(--font-num); white-space: nowrap; }

/* =============================================================
   食材库 #/ingredients 与食材详情 #/ingredients/<id>
   全部样式已归并到 ing.css（单一来源，避免两套定义互相覆盖）
   ============================================================= */

/* =============================================================
   响应式：菜谱详情页在窄屏单列
   （食材库的窄屏规则在 ing.css）
   ============================================================= */
@media (max-width: 900px) {
  .rp-hero { grid-template-columns: 1fr; gap: 18px; }
  .rp-media { aspect-ratio: 16/10; }
  .rp-body { grid-template-columns: 1fr; }
  .rp-side { order: -1; }
  .rp-in { padding: 18px 16px 56px; }
}
@media (max-width: 640px) {
  .rp-kpi { gap: 18px; }
  .ing-list { grid-template-columns: 1fr; }
  .rp-media .card-ph[data-size="hero"] b { font-size: 28px; }
}


/* ---------------------------------------------------------------- 首页底部站内导航 */
/* 首页是 SPA，首屏内容全在 JS 里。这一段由服务端注入，给爬虫一份可索引的正文
   和几十条内链，同时当页脚导航用。
   只在「家庭版 + 首页」出现：其他视图 / 企业版下这段纯属噪音。 */
body:not([data-view="list"]) .sh { display: none; }

.sh {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 26px 0 32px;
}
.sh-in {
  max-width: var(--page-w); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 40px;
}
.sh-grp h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: .01em;
}
.sh-grp h2::before {
  content: ""; flex: none; width: 3px; height: 12px;
  border-radius: 2px; background: var(--c1);
}
.sh-lead {
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
  margin: 5px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 每栏内部两列：分类名 + 计数并排，比横排堆叠整齐得多 */
.sh-links {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.sh-links a {
  font-size: 12.5px; color: var(--ink-2); line-height: 2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.sh-links a em {
  font-style: normal; font-size: 11px; color: var(--ink-3);
  margin-left: 5px; letter-spacing: 0; opacity: .85;
}
.sh-links a:hover { color: var(--c1-d); }
.sh-links a:hover em { color: var(--ink-3); }
/* 第 4 栏是站点说明，不做两列 */
.sh-text {
  font-size: 12px; color: var(--ink-3); line-height: 1.7;
  margin: 5px 0 8px;
}
.sh-links-inline {
  display: flex; flex-wrap: wrap; gap: 0 16px;
}
@media (max-width: 1080px) {
  .sh-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sh { padding: 22px 0 26px; }
  .sh-in { grid-template-columns: 1fr; gap: 18px; padding: 0 16px; }
}
