* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* 蜜桃珊瑚 · 纯白底（2026-07 定稿） */
  --accent: #ec7a58;
  --accent-2: #f79a77;
  --accent-grad: linear-gradient(135deg, #f28a64, #e96848);
  --accent-soft: #fdeee7;
  --accent-focus: #f5c3ac;
  --accent-shadow: rgba(236, 122, 88, .28);
  --bg: #fefefe;
  --card: #ffffff;
  --text: #33302c;
  --muted: #9a938c;
  --line: #efece8;
  --green: #4f7d3f;
  --glow: #fdf3ec;
  --soft-hover: #fbded1;
  --progress-grad: linear-gradient(90deg, #8fc79a, #62aa74);
  --shadow-sm: 0 1px 2px rgba(80, 60, 50, .05), 0 2px 8px rgba(80, 60, 50, .05);
  --shadow-md: 0 4px 14px rgba(80, 60, 50, .11), 0 2px 4px rgba(80, 60, 50, .05);
  --shadow-lg: 0 18px 50px rgba(60, 40, 30, .2);
  --radius: 16px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 400px at 80% -100px, var(--glow) 0%, transparent 60%),
    var(--bg);
  color: var(--text); min-height: 100vh;
}
button { font-family: inherit; }

/* ---------- 顶栏 / tab ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 242, .85); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 230, 219, .8);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  /* 顶部/左右留出刘海·状态栏安全区，避免顶栏内容被裁掉 */
  padding: calc(12px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 12px max(22px, env(safe-area-inset-left));
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; flex-shrink: 0; filter: drop-shadow(0 3px 6px var(--accent-shadow)); }
.tabs { display: flex; gap: 4px; background: rgba(255,255,255,.7); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-sm); }
.tabs button {
  border: none; background: transparent; font-size: 14.5px; color: var(--muted);
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: all .18s ease;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--accent-grad); color: #fff; font-weight: 600; box-shadow: 0 3px 10px var(--accent-shadow); }

main { max-width: 1020px; margin: 0 auto; padding: 22px 18px 100px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }
.empty { color: var(--muted); text-align: center; padding: 56px 0; font-size: 15px; }

/* ---------- 按钮 ---------- */
.btn {
  font-size: 14px; cursor: pointer; text-decoration: none; text-align: center;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 9px 16px; border-radius: 12px; transition: all .15s ease; box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--cta-grad, var(--accent-grad)); border: none; color: #fff; font-weight: 600; box-shadow: 0 3px 10px var(--cta-shadow, var(--accent-shadow)); }
.btn.danger { background: #fff2f0; border-color: #f3c1ba; color: #c0392b; }
.btn.ghost { border: none; background: transparent; box-shadow: none; color: var(--muted); font-size: 12.5px; padding: 2px 8px; }
.btn.ghost:hover { color: var(--accent); transform: none; box-shadow: none; }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 9px; }
.btn.round { width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--muted); }

/* ---------- 搜索框 ---------- */
.search-box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; box-shadow: var(--shadow-sm); transition: box-shadow .15s;
}
.search-box:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-focus); }
.search-box .s-ico { font-size: 14px; opacity: .55; }
.search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: inherit; padding: 10px 0;
}

/* ---------- 筛选 chips ---------- */
.filter-row {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 9px; padding: 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 6px 13px; border-radius: 999px; transition: all .15s ease; box-shadow: var(--shadow-sm);
}
.fchip:hover { color: var(--text); transform: translateY(-1px); }
.fchip .cnt { opacity: .6; font-size: 11.5px; margin-left: 3px; }
.fchip.active { background: var(--accent-grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 3px 8px var(--accent-shadow); }
.fchip.active .cnt { opacity: .85; }

/* ---------- 菜谱库 ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 6px;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(233, 230, 219, .7); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .thumb { position: relative; aspect-ratio: 4/3; background: #edeae0; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.06); }
.card .thumb .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 46px; color: #fff; font-weight: 600;
}
.badge-sample, .badge-cuisine {
  position: absolute; top: 9px; background: rgba(30, 42, 32, .55); color: #fff;
  font-size: 11px; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(6px);
}
.badge-sample { left: 9px; }
.badge-cuisine { left: 9px; }
.card .info { padding: 11px 13px 13px; }
.card .name { font-size: 15.5px; font-weight: 700; margin-bottom: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px;
}

/* ---------- 排餐 ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.week-center { text-align: center; }
.week-label { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.day-card {
  background: var(--card); border: 1px solid rgba(233, 230, 219, .7); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: box-shadow .18s;
}
.day-card:hover { box-shadow: var(--shadow-md); }
.day-card.today { border-color: var(--accent-focus); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.day-title { font-weight: 800; font-size: 15.5px; }
.day-date { color: var(--muted); font-size: 13px; }
.tag-today {
  background: var(--accent-grad); color: #fff; font-size: 11px; padding: 2px 9px; border-radius: 999px;
  align-self: center;
}
.day-dishes { display: flex; flex-wrap: wrap; gap: 8px; }
.dish-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); border-radius: 999px; padding: 4px 11px 4px 4px; font-size: 14px;
  transition: background .15s;
}
.dish-chip:hover { background: var(--soft-hover); }
.dish-chip img, .dish-chip .mini-ph {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.dish-chip .rm {
  border: none; background: transparent; color: var(--accent); cursor: pointer;
  font-size: 14px; padding: 0 2px; line-height: 1; border-radius: 50%; transition: color .15s;
}
.dish-chip .rm:hover { color: var(--text); }
.btn-add-dish {
  border: 1.5px dashed #cfd6c8; background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 15px; font-size: 13.5px; cursor: pointer; transition: all .15s;
}
.btn-add-dish:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- 弹窗通用 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(24, 32, 24, .5); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(3px); animation: fadeIn .2s ease;
}
.modal {
  position: relative; background: var(--card); border-radius: 20px; padding: 22px;
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 14px; font-size: 18px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(26, 34, 26, .45); color: #fff; font-size: 14px; line-height: 1;
  backdrop-filter: blur(6px); transition: background .15s, transform .15s;
}
.modal-x:hover { background: rgba(26, 34, 26, .7); transform: rotate(90deg); }
.modal label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.modal input, .modal select {
  display: block; width: 100%; margin-top: 4px; font-size: 15px; font-family: inherit;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  outline: none; transition: box-shadow .15s;
}
.modal input:focus, .modal select:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-focus); }
.modal .search-box input { margin-top: 0; border: none; box-shadow: none; }
.modal .search-box { margin-bottom: 10px; }
.modal-sm { max-width: 400px; }
.f-two { display: flex; gap: 10px; }
.f-two label { flex: 1; }
.f-ings-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted); margin: 6px 0 8px;
}
.f-ing-row { display: flex; gap: 8px; margin-bottom: 8px; }
.f-ing-row input { margin-top: 0; }
.f-ing-row .i-name { flex: 3; }
.f-ing-row .i-amt { flex: 2; }
.f-ing-row .rm { border: none; background: transparent; color: var(--muted); font-size: 17px; cursor: pointer; }
.f-ing-row .rm:hover { color: #c0392b; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.modal-actions .spacer { flex: 1; }
.picker-count { font-size: 13px; color: var(--muted); }

/* ---------- 详情弹窗 ---------- */
.modal-detail { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.detail-hero {
  position: relative; aspect-ratio: 16/9; max-height: 42vh; min-height: 0;
  background: #edeae0; flex: 0 0 auto;
}
.detail-hero img, .detail-hero .ph {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.detail-hero .ph { display: flex; align-items: center; justify-content: center; font-size: 72px; color: #fff; font-weight: 600; }
.detail-body { padding: 18px 22px 22px; overflow-y: auto; }
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-head h3 { margin: 0; font-size: 22px; }
.detail-tags { display: flex; gap: 6px; }
.dtag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: #2e5c41; font-weight: 600;
}
.detail-sub { font-size: 13.5px; color: var(--muted); font-weight: 600; margin: 14px 0 8px; }
.detail-ings { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; }
.d-ing {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 6px 2px; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.d-ing .amt { color: var(--muted); font-size: 13px; flex-shrink: 0; }
.detail-days { display: flex; gap: 7px; flex-wrap: wrap; }
.dday {
  border: 1px solid var(--line); background: var(--bg); border-radius: 11px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; text-align: center; transition: all .15s;
}
.dday:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dday.added { background: var(--accent-grad); border-color: transparent; color: #fff; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; }
.detail-actions .btn { flex: 1; }

/* ---------- 排菜弹窗 ---------- */
.picker-list { max-height: 44vh; overflow-y: auto; margin-top: 4px; }
.pick-row {
  display: flex; align-items: center; gap: 11px; padding: 8px;
  border-bottom: 1px solid #f2efe6; cursor: pointer; border-radius: 10px; transition: background .12s;
}
.pick-row:hover { background: var(--bg); }
.pick-row img, .pick-row .mini-ph {
  width: 42px; height: 42px; border-radius: 10px; object-fit: cover;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; flex-shrink: 0;
}
.pick-row .pname { flex: 1; font-size: 15px; }
.pick-row .pcat { font-size: 11.5px; color: var(--muted); }
.pick-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }

/* ---------- 首页内联搜索（替代弹框） ---------- */
/* 搜索框 + 面板包一层：面板做成锚定在搜索框下方的浮层，展开时盖住下方内容、
   而不是把一周排餐往下挤（避免点搜索框整页跳变） */
.plan-search-wrap { position: relative; z-index: 30; margin-bottom: 14px; }
.plan-search {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 4px 8px 4px 18px;
  box-shadow: var(--shadow-md); transition: box-shadow .15s ease, border-color .15s ease;
}
.plan-search:focus-within { box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md); border-color: var(--accent-focus); }
.plan-search .s-ico { font-size: 19px; opacity: .6; flex-shrink: 0; }
.plan-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 16.5px; font-family: inherit; padding: 15px 0;
}
.plan-search input::placeholder { color: var(--muted); }
.plan-clear {
  flex-shrink: 0; border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  border-radius: 10px; padding: 8px 13px; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.plan-clear:hover { color: var(--accent); border-color: var(--accent-focus); background: var(--accent-soft); }

/* 搜索结果面板：锚定在搜索框正下方的浮层（不占文档流，不挤动一周排餐） */
.search-panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  display: flex; flex-direction: column; max-height: 72vh; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 16px 8px; box-shadow: var(--shadow-lg);
  animation: dropIn .16s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.search-panel .sheet-target { flex: 0 0 auto; margin-bottom: 12px; }
.search-panel .filter-row { flex: 0 0 auto; }
.search-panel .sheet-results {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 4px -4px 0; padding: 0 4px 8px;
}
.search-panel .sheet-sec-title { background: var(--card); }

/* 排餐页分区小标题 */
.plan-week-label { font-size: 13.5px; font-weight: 800; color: var(--muted); margin: 2px 2px 12px; letter-spacing: .3px; }

/* 入库确认框里显示下厨房原标题 */
.im-src { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.im-src span { color: var(--text); }

/* 老人 iPad 桌面全屏模式（URL #beicai）：隐藏顶栏（品牌 + 三个 tab），只留备菜内容 */
body.kiosk .topbar { display: none; }
body.kiosk main { padding-top: calc(18px + env(safe-area-inset-top)); }

/* ================= 备菜页（老人 / iPad 友好：大图 + 大字） ================= */
/* 大日期条 */
#view-shopping .shop-dates { gap: 14px; padding: 4px 2px 20px; }
#view-shopping .date-chip { padding: 14px 26px; border-radius: 20px; }
#view-shopping .date-chip .d1 { font-size: 18px; }
#view-shopping .date-chip .d2 { font-size: 24px; }

.prep-h {
  font-size: 30px; font-weight: 800; color: var(--text);
  margin: 26px 2px 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* 每道菜一张大卡：大图 + 菜名 + 要买的料（只写菜名、不写用量） */
.prep-cards { display: flex; flex-direction: column; gap: 26px; }
.prep-card {
  display: flex; gap: 32px; align-items: stretch;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.prep-card-img { flex: 0 0 460px; align-self: stretch; min-height: 340px; background: #edeae0; }
.prep-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prep-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 110px; color: #fff; font-weight: 700; }
.prep-card-body { flex: 1 1 auto; min-width: 0; padding: 30px 34px 30px 0; align-self: center; }
.prep-card-name { font-size: 42px; font-weight: 800; margin-bottom: 24px; line-height: 1.15; }
.prep-card-ings { display: flex; flex-wrap: wrap; gap: 14px; }
.pci { font-size: 29px; font-weight: 700; background: var(--accent-soft); color: var(--text); border-radius: 16px; padding: 11px 24px; line-height: 1.2; }
.pci-none { font-size: 26px; color: var(--muted); }

/* 窄屏（iPad 竖屏 768 / 手机 / 分屏）：图片放上面铺满，菜名+料在下面，字更大更好读 */
@media (max-width: 900px) {
  .prep-card { flex-direction: column; gap: 0; }
  .prep-card-img { flex: none; width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
  .prep-card-body { padding: 24px 26px 28px; align-self: stretch; }
  .prep-card-name { font-size: 38px; }
}

/* 空态 */
.prep-empty { text-align: center; padding: 70px 20px; font-size: 68px; color: var(--muted); }
.prep-empty .pe-title { font-size: 31px; font-weight: 800; color: var(--text); margin: 16px 0 12px; }
.prep-empty p { font-size: 21px; line-height: 1.6; }

/* 桌面：一周排餐用两列，减少纵向翻页 */
@media (min-width: 760px) {
  #week-days { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; align-items: start; }
  #week-days .day-card { margin-bottom: 0; }
}

/* ---------- 统一搜索面板（库内 + 下厨房） ---------- */
.modal-sheet {
  max-width: 580px; display: flex; flex-direction: column;
  height: 84vh; max-height: 84vh; padding: 20px 20px 6px;
}
.sheet-search {
  display: flex; align-items: center; gap: 9px; margin: 2px 42px 12px 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  transition: box-shadow .15s, border-color .15s;
}
.sheet-search:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-focus); }
.sheet-search .s-ico { font-size: 15px; opacity: .55; }
.sheet-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; font-family: inherit; padding: 12px 0;
}
.sheet-target { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-target-lab { flex-shrink: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.sheet-days {
  display: flex; gap: 7px; overflow-x: auto; padding: 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sheet-days::-webkit-scrollbar { display: none; }
.sheet-day {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: all .15s ease;
}
.sheet-day:hover { color: var(--text); transform: translateY(-1px); }
.sheet-day.active { background: var(--accent-grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 3px 8px var(--accent-shadow); }
.sheet-results { flex: 1; overflow-y: auto; margin: 2px -4px 0; padding: 0 4px 14px; }
.sheet-sec { margin-bottom: 10px; }
.sheet-sec-title {
  font-size: 13px; color: var(--muted); font-weight: 700; margin: 6px 2px;
  position: sticky; top: 0; background: var(--card); padding: 6px 0 7px; z-index: 1;
}
.sheet-hint { color: var(--muted); font-size: 13.5px; padding: 8px 4px; line-height: 1.6; }
.sheet-tip { text-align: center; padding: 34px 20px; }
.pick-row.online .pname {
  font-size: 14px; line-height: 1.45; display: block;
}
.pick-row.online .pcat a { color: var(--muted); text-decoration: none; font-size: 11.5px; }
.pick-row.online .pcat a:hover { color: var(--accent); }
.add-btn {
  flex-shrink: 0; border: 1px solid var(--accent-focus); background: var(--card); color: var(--accent);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; box-shadow: var(--shadow-sm); transition: all .15s ease;
}
.add-btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.add-btn:active { transform: scale(.95); }
.add-btn.added { background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: 0 2px 6px var(--accent-shadow); }
.add-btn:disabled { opacity: .6; cursor: default; transform: none; }

/* 搜索面板里的缩略图放大，看得清（比默认 42px 大一圈） */
.sheet-results .pick-row { padding: 10px 8px; gap: 13px; align-items: center; }
.sheet-results .pick-row img, .sheet-results .pick-row .mini-ph {
  width: 66px; height: 66px; border-radius: 13px; font-size: 26px;
}
.sheet-results .pick-row.online .pname { align-self: center; }

/* 详情浮层要能叠在搜索面板之上（面板 z-index 50） */
#detail-modal { z-index: 60; }
.dish-chip { cursor: pointer; }

/* ---------- 买菜 ---------- */
.shop-dates {
  display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shop-dates::-webkit-scrollbar { display: none; }
.date-chip {
  flex: 0 0 auto; text-align: center; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 8px 15px; cursor: pointer; box-shadow: var(--shadow-sm); transition: all .15s;
}
.date-chip:hover { transform: translateY(-1px); }
.date-chip .d1 { font-size: 12.5px; color: var(--muted); }
.date-chip .d2 { font-size: 14.5px; font-weight: 700; }
.date-chip.active { background: var(--accent-grad); border-color: transparent; box-shadow: 0 3px 10px var(--accent-shadow); }
.date-chip.active .d1, .date-chip.active .d2 { color: #fff; }
.shop-summary {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid rgba(233,230,219,.7); border-radius: var(--radius);
  padding: 13px 16px; margin: 10px 0 16px; box-shadow: var(--shadow-sm);
}
.shop-menu { flex: 1; color: var(--text); font-size: 14px; line-height: 1.6; }
.shop-menu b { font-weight: 700; }
.shop-progress { flex-shrink: 0; text-align: center; }
.shop-progress .num { font-size: 20px; font-weight: 800; color: var(--green); }
.shop-progress .lab { font-size: 11px; color: var(--muted); }
.progress-bar { height: 6px; background: #edeae0; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress-bar i { display: block; height: 100%; background: var(--progress-grad); border-radius: 999px; transition: width .3s ease; }
.shop-section { margin-bottom: 20px; }
.shop-section h4 { font-size: 13.5px; color: var(--muted); font-weight: 600; margin: 0 2px 9px; }
.shop-item {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--card); border: 1px solid rgba(233,230,219,.7); border-radius: 13px;
  padding: 12px 15px; margin-bottom: 9px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.shop-item:hover { box-shadow: var(--shadow-md); }
.shop-item input[type=checkbox] { width: 21px; height: 21px; margin-top: 1px; accent-color: var(--green); flex-shrink: 0; }
.shop-item .iname { font-size: 16px; font-weight: 700; }
.shop-item .idetail { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.shop-item.done { opacity: .45; }
.shop-item.done .iname { text-decoration: line-through; }
.shop-done-tip { text-align: center; color: var(--green); padding: 14px; font-size: 16px; font-weight: 600; }

/* 常备调料 · 葱姜蒜：默认收起的浅色提示，不干扰真正要买的生鲜 */
.shop-pantry { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 12px; }
.shop-pantry > summary {
  list-style: none; cursor: pointer; color: var(--muted); font-size: 13px;
  padding: 4px 2px; user-select: none; transition: color .15s ease;
}
.shop-pantry > summary::-webkit-details-marker { display: none; }
.shop-pantry > summary::before { content: '▸ '; }
.shop-pantry[open] > summary::before { content: '▾ '; }
.shop-pantry > summary:hover { color: var(--text); }
.pantry-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 2px 2px; }
.ptag {
  font-size: 12.5px; color: var(--muted); background: var(--glow);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}

/* ---------- 找菜谱 ---------- */
.discover-hero {
  text-align: center; padding: 26px 16px 22px;
  background: var(--card); border-radius: 20px; border: 1px solid rgba(233,230,219,.7);
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.discover-hero h2 { font-size: 21px; margin-bottom: 6px; }
.discover-hero p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.discover-search { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.discover-search input {
  flex: 1; font-size: 15px; font-family: inherit; outline: none;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; transition: box-shadow .15s;
}
.discover-search input:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent-focus); }
.dis-status { color: var(--muted); font-size: 14px; margin: 6px 4px 12px; }
.dis-card-title { font-size: 13.5px; line-height: 1.5; color: var(--text); margin-bottom: 9px; min-height: 40px; }
.dis-actions { display: flex; gap: 8px; align-items: center; }
.dis-actions .btn { flex: 1; }
.dis-in { color: var(--green); font-size: 13px; font-weight: 600; }
.import-from { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: rgba(24, 32, 24, .88); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; z-index: 99; max-width: 86vw; display: none;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(6px);
}

/* ---------- 手机适配 ---------- */
@media (max-width: 680px) {
  .topbar { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
  /* 手机上搜索框收紧一点，占位文案调小，不显得那么大 */
  .plan-search { padding: 2px 6px 2px 14px; }
  .plan-search .s-ico { font-size: 17px; }
  .plan-search input { font-size: 16px; padding: 13px 0; }
  .plan-search input::placeholder { font-size: 13.5px; }
  .plan-clear { padding: 7px 11px; font-size: 12.5px; }
  .tabs {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; border-radius: 0;
    background: rgba(255, 255, 255, .93); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(90, 70, 50, .08);
    justify-content: space-around; padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  }
  .tabs button { flex: 1; flex-direction: column; gap: 2px; font-size: 11.5px; padding: 5px 4px; }
  .tabs button .t-ico { font-size: 20px; }
  .tabs button.active { box-shadow: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  main { padding: 16px 14px 110px; }
  .detail-ings { grid-template-columns: 1fr; }
  .modal { max-height: 84vh; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; animation: slideUp .25s cubic-bezier(.2, .9, .3, 1); }
  @keyframes slideUp { from { transform: translateY(60px); opacity: .5; } to { transform: none; opacity: 1; } }
  .week-label { font-size: 15.5px; }
}

/* ---------- 收藏爱心 ---------- */
.fav-btn {
  position: absolute; top: 3px; right: 3px; z-index: 3;
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.fav-btn:hover { transform: scale(1.18); }
.fav-btn:active { transform: scale(.9); }
.fav-btn svg {
  width: 20px; height: 20px;
  fill: rgba(255, 255, 255, .92);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
  transition: fill .15s;
}
.fav-btn.faved svg {
  fill: var(--accent);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
  animation: favPop .3s ease;
}
@keyframes favPop { 40% { transform: scale(1.35); } }
.detail-fav { position: static; width: 38px; height: 38px; flex-shrink: 0; }
.detail-fav svg { width: 24px; height: 24px; fill: #ddd5cd; filter: none; }
.detail-fav.faved svg { fill: var(--accent); filter: none; }
.fav-chip.active { background: var(--accent-grad); }
