/* ================= 家庭点菜 · 小食堂 ================= */
:root {
  --bg: #fbf5ec;
  --bg2: #fffaf3;
  --card: #ffffff;
  --ink: #4a3b31;
  --ink2: #8a7768;
  --ink3: #b3a494;
  --line: #f0e5d6;
  --brand: #f09a6a;
  --brand2: #f6c28b;
  --brand-deep: #e07d4b;
  --green: #8ab98a;
  --pink: #f2a7b5;
  --blue: #8fb4dc;
  --radius: 20px;
  --shadow: 0 6px 22px rgba(150, 105, 60, 0.10);
  --shadow-sm: 0 2px 10px rgba(150, 105, 60, 0.08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
}
/* 只让真正的 emoji 用彩色字体，避免 🔍⏱🍚 等符号变成一团彩色方块 */
.emoji, .brand-logo, .mc-emoji, .me-emoji, .nav-icon, .mcard, .baby-head, .bullet-icon { font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.ico { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* ---------- 布局 ---------- */
#app { max-width: 1080px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(84px + var(--safe-b)); }
.main { padding: 0 14px; }
@media (min-width: 700px) { .main { padding: 0 20px; } }

/* ---------- 顶栏 ---------- */
.userbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px 10px;
  background: linear-gradient(180deg, #fff7ec 0%, rgba(255, 247, 236, 0.92) 70%, rgba(255, 247, 236, 0) 100%);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { font-size: 26px; filter: drop-shadow(0 2px 4px rgba(224,125,75,.3)); }
.brand-title { font-weight: 800; font-size: 17px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--ink2); white-space: nowrap; }
.brand > div { min-width: 0; }
.who { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 999px; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.chip {
  border: 0; background: transparent; border-radius: 999px; padding: 6px 11px; font-size: 13px; color: var(--ink2);
  display: flex; align-items: center; gap: 4px; transition: all .18s ease;
}
.chip .emoji { font-size: 15px; }
.chip .avatar { margin-right: 1px; }
.chip.on { background: color-mix(in srgb, var(--c, #f09a6a) 22%, #fff); color: var(--ink); font-weight: 700; box-shadow: 0 2px 8px color-mix(in srgb, var(--c, #f09a6a) 30%, transparent); }
@media (max-width: 460px) {
  .userbar { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px 8px; }
  .who { align-self: flex-start; }
  .brand-title { font-size: 16px; }
  .chip { padding: 5px 10px; font-size: 12.5px; }
  .chip .emoji { font-size: 14px; }
}
@media (max-width: 340px) { .chip { padding: 5px 7px; } }

/* ---------- 首页 hero ---------- */
.page { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero {
  position: relative; border-radius: 26px; overflow: hidden; margin: 6px 0 16px;
  max-width: 100%;
  background: linear-gradient(135deg, #ffd9b8 0%, #ffc7a6 45%, #ffb3a7 100%);
  box-shadow: 0 10px 30px rgba(240, 154, 106, .28);
}
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 22px 30px; }
.hero-text { min-width: 0; }
@media (max-width: 400px) { .hero-inner { padding: 18px 16px 26px; } .hero-hi { font-size: 18.5px; } .hero-cart { width: 54px; height: 54px; } }
.hero-text { color: #6a3b26; }
.hero-hi { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.hero-sub { margin-top: 6px; font-size: 13.5px; color: #8a5536; }
.hero-cart {
  position: relative; z-index: 4; border: 0; width: 62px; height: 62px; border-radius: 50%; flex-shrink: 0;
  background: #fff; box-shadow: 0 6px 18px rgba(180, 100, 60, .25);
  display: grid; place-items: center; transition: transform .15s ease;
}
.hero-cart .cart-emoji { display: grid; place-items: center; }
.hero-cart .cart-emoji svg { width: 34px; height: 34px; }
.hero-cart:active { transform: scale(.94); }
.cart-num {
  position: absolute; z-index: 5; top: -3px; right: -3px; min-width: 22px; height: 22px; border-radius: 11px;
  background: #ef6f5b; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}
.hero-wave {
  position: absolute; z-index: 1; inset: auto -10% -34px -10%; height: 90px;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.55), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,.4), transparent 55%);
  border-radius: 50%;
}
.hero::after {
  content: ""; position: absolute; z-index: 1; width: 120px; height: 120px; right: -30px; top: -40px;
  background: radial-gradient(circle, rgba(255,255,255,.45), transparent 70%); border-radius: 50%;
}

/* ---------- 搜索 & 分类 ---------- */
.searchrow { display: flex; gap: 8px; margin-bottom: 12px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px;
  padding: 0 16px; height: 46px; box-shadow: var(--shadow-sm); color: var(--ink3);
}
.search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14.5px; min-width: 0; color: var(--ink); }
.filterbtn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; padding: 0;
  box-shadow: var(--shadow-sm); transition: all .18s ease; display: grid; place-items: center;
}
.filterbtn svg { width: 26px; height: 26px; }
.filterbtn.on { background: #cdeedd; box-shadow: 0 0 0 2px #8fd0b4 inset; transform: scale(1.04); }

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex-shrink: 0; border: 0; background: #fff; color: var(--ink2); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.cat.on { background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(74,59,49,.25); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 12px; }
.section-head h2 { font-size: 18px; }
.sortsel {
  border: 0; background: #fff; border-radius: 999px; padding: 7px 30px 7px 14px; font-size: 13px; color: var(--ink2);
  box-shadow: var(--shadow-sm); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a7768' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* ---------- 菜卡 ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column; cursor: pointer;
}
.card:active { transform: scale(.98); }
.card:hover { box-shadow: 0 10px 28px rgba(150, 105, 60, .16); }
.card.ordered { box-shadow: 0 0 0 2px var(--brand) inset, var(--shadow); }
.card-pic { position: relative; }
.pic {
  position: relative; aspect-ratio: 16 / 11; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #fff 0%, transparent 55%), var(--accent);
}
.pic svg { width: 74%; height: 74%; position: relative; z-index: 2; filter: drop-shadow(0 6px 10px rgba(120, 70, 30, .13)); transform: translateY(4%); }
.pic-blob {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: var(--tint); opacity: .85; top: 16%; left: 11%;
  box-shadow: inset 0 -8px 20px rgba(255,255,255,.35);
}
.pic-blob::after {
  content: ""; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%;
  background: #fff; opacity: .45; right: -12%; top: -10%;
}
.badges { position: absolute; z-index: 3; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px); white-space: nowrap; }
.badge.baby.ok { background: rgba(133, 196, 160, .95); color: #fff; }
.badge.baby.warn { background: rgba(250, 205, 120, .95); color: #6b4a12; }
.badge.baby.no { background: rgba(220, 200, 185, .95); color: #7a6a5d; }
.badge.time { background: rgba(255,255,255,.9); color: #d9734a; }
.others { position: absolute; z-index: 3; right: 8px; top: 8px; display: flex; gap: 2px; }
.others .dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.others .dot .avatar { width: 24px; height: 24px; }

.card-body { padding: 10px 12px 13px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.card-body h3 { font-size: 15.5px; line-height: 1.3; }
.card-body .sub { margin: 0; font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body .meta { display: flex; gap: 4px 10px; flex-wrap: wrap; font-size: 11px; color: var(--ink2); margin-top: 3px; }
.card-body .meta span { display: inline-flex; align-items: center; gap: 3px; }
.card-body .meta .ico, .oinfo .ico { width: 12px; height: 12px; stroke: var(--ink3); }
.card-body .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; padding-right: 40px; }
.card-body .tags span { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: #fbf3e8; color: #b08a63; }

.card-add {
  position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(224, 125, 75, .4); transition: transform .15s ease, background .2s;
  z-index: 4;
}
.card-add:active { transform: scale(.88); }
.card-add.on { background: #fff; color: var(--brand-deep); box-shadow: 0 0 0 2px var(--brand-deep) inset; font-size: 17px; }

.footer-note { text-align: center; font-size: 11.5px; color: var(--ink3); padding: 22px 0 8px; line-height: 1.7; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink2); padding: 44px 16px; font-size: 15px; line-height: 2; }
.empty.small { padding: 26px 10px; font-size: 14px; }

/* ---------- 今日已点 ---------- */
.carthead { padding: 10px 0 14px; }
.carthead h1 { font-size: 23px; }
.carthead p { margin: 4px 0 0; color: var(--ink2); font-size: 13px; }

.member-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 20px; }
.mcard {
  border: 0; background: #fff; border-radius: 18px; padding: 12px 8px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all .18s ease;
}
.mcard.on { box-shadow: 0 0 0 2px var(--c) inset, var(--shadow); background: #fff; }
.mc-emoji { display: flex; justify-content: center; }
.mc-name { font-size: 13px; font-weight: 700; margin-top: 2px; }
.mc-val { font-size: 11px; color: var(--ink2); margin-top: 2px; }

.block-h { font-size: 16px; margin: 22px 2px 10px; display: flex; align-items: center; gap: 8px; }
.block-h small { font-weight: 400; color: var(--ink3); font-size: 12px; }
.mini { margin-left: auto; border: 0; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; color: var(--brand-deep); box-shadow: var(--shadow-sm); }

.orderlist { display: flex; flex-direction: column; gap: 8px; }
.orow, .mrow { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.opic {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent); position: relative; overflow: hidden;
}
.opic::before { content: ""; position: absolute; inset: 15% 10% 15% 10%; border-radius: 50%; background: var(--tint); }
.opic svg { width: 84%; height: 84%; position: relative; z-index: 1; }
.oinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.oinfo b { font-size: 15px; }
.oinfo span { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.oinfo span .ico { width: 12px; height: 12px; stroke: var(--ink3); }
.orow-del { border: 0; background: #fbeee9; color: #d9735a; width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.mrow-edit { border: 0; background: #fbf3e8; color: #b08a63; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }

/* 营养进度 */
.nutrition-card { background: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.nc-sum { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ring {
  --p: 0; width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), #f7ece0 0);
  position: relative;
}
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.ring span { position: relative; font-weight: 800; font-size: 17px; color: var(--brand-deep); }
.nc-sum b { font-size: 15px; }
.nc-sum p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink2); }
.prog-list { display: flex; flex-direction: column; gap: 12px; }
.prog-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.prog-head span { color: var(--ink2); }
.prog-head b { font-size: 13.5px; }
.prog-head small { font-weight: 400; color: var(--ink3); }
.prog-track { height: 9px; border-radius: 99px; background: #f7efe5; overflow: hidden; display: flex; }
.prog-track i { height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.prog-track em { height: 100%; background: #ef6f5b; }
.prog.good .prog-head b { color: #4f9a63; }
.prog.over .prog-head b { color: #d9604b; }
.nc-tip { margin: 14px 0 0; font-size: 12px; color: var(--ink2); background: #fdf7ee; border-radius: 12px; padding: 10px 12px; line-height: 1.65; }

/* 按钮 */
.btn { border: 0; border-radius: 14px; padding: 11px 18px; font-weight: 700; font-size: 15px; background: #f5ede2; color: var(--ink); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: 0 6px 16px rgba(224, 125, 75, .32); }
.btn.primary.ordered { background: #fff; color: var(--brand-deep); box-shadow: 0 0 0 2px var(--brand-deep) inset; }
.btn.ghost { background: #fff; box-shadow: var(--shadow-sm); color: var(--ink2); }
.btn.danger { background: #fdece8; color: #cf5c47; }
.btn.wide { width: 100%; margin-top: 18px; }
.btn.big { flex: 1; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; margin-top: 16px; }
.row.gap .btn { flex: 1; }
.linkbtn { border: 0; background: none; color: var(--brand-deep); font-weight: 700; padding: 0 4px; }

/* ---------- 管理 ---------- */
.mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .mgrid { grid-template-columns: repeat(3, 1fr); } }
.mtile { border: 0; background: #fff; border-radius: 18px; padding: 16px 14px; text-align: left; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.mtile span { font-size: 24px; min-height: 30px; display: flex; align-items: center; }
.mtile .mtile-icon { display: flex; }
.mtile b { font-size: 15px; margin-top: 4px; }
.mtile small { font-size: 11.5px; color: var(--ink3); }
.mlist { display: flex; flex-direction: column; gap: 8px; }
.pin-gate { background: #fff; border-radius: 18px; padding: 22px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.pin-gate input { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; font-size: 20px; letter-spacing: 6px; }

/* ---------- 底部导航 ---------- */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); z-index: 40;
  width: min(420px, calc(100% - 32px));
  display: flex; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px);
  border-radius: 22px; box-shadow: 0 10px 30px rgba(120, 80, 50, .18); padding: 6px;
}
.nav-item {
  flex: 1; border: 0; background: transparent; border-radius: 16px; padding: 7px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11.5px; color: var(--ink3);
  transition: all .18s ease;
}
.nav-item .nav-icon { position: relative; line-height: 1.2; display: grid; place-items: center; }
.nav-item .nav-icon svg { width: 25px; height: 25px; }
.nav-item.on { color: var(--brand-deep); font-weight: 700; background: #fff2e6; }
.nav-dot {
  position: absolute; top: -5px; right: -10px; min-width: 17px; height: 17px; border-radius: 9px;
  background: #ef6f5b; color: #fff; font-size: 10px; font-style: normal; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------- 弹出层 ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-mask { position: absolute; inset: 0; background: rgba(58, 40, 28, .45); opacity: 0; transition: opacity .22s ease; }
.sheet-wrap.show .sheet-mask { opacity: 1; }
.sheet {
  position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--bg2);
  border-radius: 26px 26px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); transform: translateY(40px); opacity: 0;
  transition: transform .26s cubic-bezier(.2,.9,.3,1), opacity .22s ease; box-shadow: 0 -10px 40px rgba(60, 40, 20, .2);
}
.sheet-wrap.show .sheet { transform: none; opacity: 1; }
.sheet.full { padding: 0 0 calc(96px + var(--safe-b)); max-height: 96vh; width: min(640px, 100%); }
.sheet.tall { max-height: 94vh; }
.sheet-title { font-size: 19px; margin-bottom: 14px; }
.sheet-text { margin: 0; color: var(--ink2); }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; max-height: 88vh; }
}

/* 详情 */
.detail-hero { position: relative; background: radial-gradient(circle at 50% 20%, #fff 0%, transparent 60%), var(--accent); padding: 14px 16px 0; text-align: center; }
.detail-pic { aspect-ratio: auto; height: 210px; background: transparent; }
.detail-pic svg { width: auto; height: 92%; }
.detail-pic .pic-blob { width: 170px; left: 50%; top: 46%; transform: translate(-50%, -50%); }
.detail-title { padding: 4px 0 20px; }
.detail-title h2 { font-size: 24px; letter-spacing: .5px; }
.detail-title p { margin: 4px 0 0; color: var(--ink2); font-size: 13.5px; }
.roundbtn { position: absolute; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); box-shadow: var(--shadow-sm); font-size: 15px; }
.roundbtn.close { left: 14px; top: 14px; }
.detail-body { padding: 0 16px; }
.quickinfo { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 18px; padding: 12px 6px; box-shadow: var(--shadow); margin-top: -10px; position: relative; z-index: 2; }
.quickinfo div { text-align: center; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); }
.quickinfo div:last-child { border-right: 0; }
.quickinfo b { font-size: 17px; color: var(--brand-deep); }
.quickinfo span { font-size: 11px; color: var(--ink3); }

.nutri-card { background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); margin-top: 14px; }
.nutri-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.nutri-head h3 { font-size: 16px; }
.nutri-head small { font-weight: 400; font-size: 11px; color: var(--ink3); }
.tip-r { font-size: 10.5px; color: var(--ink3); }
.nutri-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.nb-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.nb-head span { color: var(--ink2); }
.nb-head small { font-weight: 400; color: var(--ink3); font-size: 10.5px; margin-left: 2px; }
.nb-track { height: 8px; background: #f7efe5; border-radius: 99px; overflow: hidden; }
.nb-track i { display: block; height: 100%; border-radius: 99px; }
.nutri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.nutri-grid div { text-align: center; }
.nutri-grid b { display: block; font-size: 17px; }
.nutri-grid span { font-size: 11px; color: var(--ink3); }

.baby-card { border-radius: 18px; padding: 14px 16px; margin-top: 14px; }
.baby-card.ok { background: #eef8f1; }
.baby-card.warn { background: #fff6e3; }
.baby-card.no { background: #f6efe8; }
.baby-head { display: flex; align-items: center; gap: 6px; font-size: 14.5px; margin-bottom: 6px; }
.baby-head .age { margin-left: auto; font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.75); font-weight: 700; }
.baby-card p { margin: 4px 0 0; font-size: 13px; color: #5d6a5f; line-height: 1.7; }
.allergen { margin-top: 12px; font-size: 12.5px; color: #c0604c; background: #fdeee9; border-radius: 12px; padding: 9px 12px; }
.note { margin-top: 12px; font-size: 12.5px; color: #7d6a58; background: #fdf5e9; border-radius: 12px; padding: 10px 12px; line-height: 1.7; }

.ingredients { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); }
.ingredients li { display: flex; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid #f8f1e8; font-size: 14px; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients li span { color: var(--ink2); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; background: #fff; border-radius: 16px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.steps .num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #fff0e2; color: var(--brand-deep);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.steps p { margin: 0; font-size: 14px; line-height: 1.65; }
.tips { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink2); line-height: 1.8; }
.orderedby { margin-top: 20px; font-size: 12.5px; color: var(--ink2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.orderedby span { background: #fff; border-radius: 99px; padding: 4px 10px; box-shadow: var(--shadow-sm); }

.detail-foot {
  position: sticky; bottom: 0; margin-top: 20px; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b)); background: rgba(255, 250, 243, .95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); z-index: 10;
}
.portion { display: flex; align-items: center; gap: 4px; background: #f5ede2; border-radius: 999px; padding: 4px; flex-shrink: 0; }
.portion span { font-size: 11.5px; color: var(--ink3); padding: 0 4px; }
.portion button { border: 0; background: transparent; border-radius: 999px; padding: 6px 9px; font-size: 12px; color: var(--ink2); }
.portion button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: var(--shadow-sm); }

/* 编辑器 */
.editor { display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.fld > span { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.fld input, .fld select, .fld textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 14px; outline: 0; width: 100%;
  transition: border-color .15s;
}
.fld input:focus, .fld textarea:focus, .fld select:focus { border-color: var(--brand2); }
.fld textarea { resize: vertical; line-height: 1.6; }
.fld-row { display: flex; gap: 10px; }
.iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.iconpick .ic { border: 0; background: #fbf5ec; border-radius: 10px; aspect-ratio: 1; display: grid; place-items: center; padding: 4px; }
.iconpick .ic svg { width: 100%; height: 100%; }
.iconpick .ic.on { background: #ffe8d1; box-shadow: 0 0 0 2px var(--brand) inset; }
.nutri-edit { display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 16px; padding: 12px; border: 1px dashed var(--line); }
.hint { margin: 0; font-size: 11.5px; color: var(--ink3); line-height: 1.6; }

/* 目标 */
.tblock { background: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--c); }
.tblock h4 { font-size: 15px; margin-bottom: 10px; }
.tgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.tgrid label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); }
.tgrid label span { width: 50px; flex-shrink: 0; }
.tgrid input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; font-size: 14px; width: 100%; }
.tgrid i { font-style: normal; font-size: 11px; color: var(--ink3); width: 22px; }

/* 成员 */
.medit { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--c); }
.me-emoji { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fbf5ec; flex-shrink: 0; padding: 0; display: grid; place-items: center; overflow: hidden; }
.me-name { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 14px; }
.me-color { width: 38px; height: 34px; border: 0; background: none; padding: 0; }
.me-del { border: 0; background: #fbeee9; color: #d9735a; width: 30px; height: 30px; border-radius: 50%; }
.switch { display: flex; align-items: center; gap: 10px; padding: 10px 2px; font-size: 14px; }
.switch input { width: 20px; height: 20px; accent-color: var(--brand); }

/* toast / 其他 */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 90;
  background: rgba(58, 40, 28, .92); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s ease; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: rgba(190, 70, 50, .95); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(100vh) rotate(540deg); opacity: 0; } }
.install {
  position: fixed; right: 16px; bottom: calc(96px + var(--safe-b)); z-index: 45; border: 0;
  background: #4a3b31; color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 13px; box-shadow: var(--shadow);
}
.fatal { max-width: 520px; margin: 20vh auto; padding: 24px; background: #fff; border-radius: 20px; text-align: center; box-shadow: var(--shadow); }
.fatal h2 { font-size: 19px; margin-bottom: 10px; }
.fatal p { color: var(--ink2); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- 头像 ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--c, #7f9ed4) 18%, #fff); flex-shrink: 0; vertical-align: middle; }
.avatar svg { width: 100%; height: 100%; display: block; }
.dot .avatar { background: #fff; }
.orderedby span { display: inline-flex; align-items: center; gap: 4px; }
.mcard .avatar { margin: 0 auto; }

/* 安装按钮：不挡内容，只在顶部留白处出现 */
.install {
  position: static; display: block; width: calc(100% - 28px); max-width: 1052px; margin: 4px auto 2px;
  border: 1px dashed #e6cdb2; background: #fff8ef; color: #b0815a; border-radius: 14px; padding: 9px 14px;
  font-size: 13px; text-align: center; box-shadow: none;
}

/* ---------- 餐次 ---------- */
.mealbar {
  display: flex; gap: 6px; background: #fff; border-radius: 16px; padding: 5px;
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.mealtab {
  flex: 1; border: 0; background: transparent; border-radius: 12px; padding: 9px 4px;
  font-size: 13.5px; color: var(--ink2); display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: all .18s ease; white-space: nowrap;
}
.mealtab.on { background: linear-gradient(135deg, #fff0e2, #ffe2cc); color: var(--brand-deep); font-weight: 800; box-shadow: 0 2px 8px rgba(224,125,75,.18); }
.mealtab i {
  font-style: normal; min-width: 16px; height: 16px; border-radius: 8px; background: #ef6f5b; color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}
.meal-tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  display: inline-block; line-height: 1.5;
}
.meal-tag.m-breakfast { background: #fff1dd; color: #c9812f; }
.meal-tag.m-lunch { background: #e8f4ec; color: #4f8f63; }
.meal-tag.m-dinner { background: #eceafb; color: #6a5bb5; }
.meal-tag.m-both { background: #e7f1fb; color: #4a7fb0; }
.sub-meta { color: var(--ink3); }

/* 今日页 */
.mc-slots { display: flex; gap: 3px; justify-content: center; margin-top: 4px; }
.mc-slots i {
  font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 6px;
  background: #f5ede2; color: var(--ink3);
}
.mc-slots i.on { background: #ffe9d6; color: var(--brand-deep); font-weight: 700; }
.mealgroup { margin-bottom: 12px; }
.mealgroup-head { display: flex; align-items: center; gap: 8px; margin: 4px 2px 6px; font-size: 13.5px; }
.mealgroup-head span { color: var(--ink3); font-size: 12px; margin-left: auto; }
.mealtabs { display: flex; gap: 6px; margin: 0 0 12px; }
.mtab {
  border: 0; background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--ink2);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 4px;
}
.mtab small { font-size: 10px; color: var(--ink3); }
.mtab.on { background: var(--ink); color: #fff; font-weight: 700; }
.mtab.on small { color: rgba(255,255,255,.7); }
.family-today { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-sm); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.family-today b { font-size: 13.5px; width: 100%; }
.family-empty { color: var(--ink3); font-size: 12.5px; }
.dishchip {
  border: 0; background: var(--accent); border-radius: 999px; padding: 4px 12px 4px 5px; display: inline-flex;
  align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink);
}
.dishchip svg { width: 22px; height: 22px; }

/* 首页：餐次切换放在 hero 里（覆盖在暖色底上，不额外占一整行） */
.hero .mealbar {
  position: relative; z-index: 3; margin: 0 14px 16px; background: rgba(255, 255, 255, .72);
  box-shadow: none; backdrop-filter: blur(6px); border-radius: 14px; padding: 4px;
}
.hero .mealtab { padding: 7px 2px; font-size: 12.5px; color: #8a5536; }
.hero .mealtab.on { background: #fff; color: var(--brand-deep); box-shadow: 0 2px 6px rgba(180,100,60,.18); }
.hero .mealtab i { background: #ef6f5b; }
.hero { padding-bottom: 2px; }

.mg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mg-dot.m-breakfast { background: #e8a33d; }
.mg-dot.m-lunch { background: #5fa97a; }
.mg-dot.m-dinner { background: #7d6bc9; }
.mealgroup-head .mg-sum { color: var(--ink3); font-size: 12px; margin-left: auto; }
