:root {
  --bg: #FBF7F0;
  --bg-soft: #F4EEE4;
  --card: #FFFDF9;
  --ink: #3B3128;
  --ink-2: #6B5F52;
  --muted: #93887A;
  --primary: #D2603A;
  --primary-deep: #B84E2C;
  --olive: #6B7A52;
  --line: rgba(59, 49, 40, 0.09);
  --shadow-sm: 0 2px 6px rgba(59, 49, 40, 0.05);
  --shadow: 0 10px 28px rgba(59, 49, 40, 0.08);
  --radius: 20px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image: radial-gradient(circle at 12% 8%, rgba(210, 96, 58, 0.06), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(107, 122, 82, 0.07), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(251, 247, 240, 0.86);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #F7D9C4, #EBB293);
  border-radius: 14px;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--serif); font-size: 18px; letter-spacing: 0.5px; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }

.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 0.18s, color 0.18s;
}
.nav a:hover { background: rgba(210, 96, 58, 0.08); color: var(--primary-deep); }
.nav a.on { background: var(--ink); color: #FFFDF9; }

.who {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s, box-shadow 0.16s;
}
.who:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.who span:first-child { font-size: 16px; }

/* ---------- 布局 ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 110px;
}
.pad { padding: 0; }

.page-head { margin: 6px 0 18px; }
.page-head h1 {
  font-family: var(--serif);
  font-size: 27px;
  margin: 0 0 6px;
  letter-spacing: 0.6px;
  font-weight: 700;
}
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 12px;
}
.section-title h2 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0;
  letter-spacing: 0.4px;
}
.section-title span { font-size: 12px; color: var(--muted); }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn.primary {
  background: linear-gradient(135deg, #DD7150, var(--primary-deep));
  color: #fff;
  box-shadow: 0 8px 18px rgba(184, 78, 44, 0.24);
}
.btn.primary:hover { box-shadow: 0 10px 22px rgba(184, 78, 44, 0.3); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: rgba(59, 49, 40, 0.04); }
.btn.olive { background: rgba(107, 122, 82, 0.12); color: var(--olive); }
.btn.olive:hover { background: rgba(107, 122, 82, 0.2); }
.btn.danger { background: rgba(184, 78, 44, 0.08); color: var(--primary-deep); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.pill.pending { background: #F8E7C8; color: #95651A; }
.pill.cooking { background: #DFEBD8; color: #4A6B3D; }
.pill.done { background: #EAE5DD; color: #7C7166; }
.pill.rejected { background: #FADBD3; color: #A5442F; }
.pill.canceled { background: #F0EBE4; color: #97907F; }
.pill.olive { background: rgba(107, 122, 82, 0.14); color: var(--olive); }

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s;
}
.chip:hover { border-color: rgba(210, 96, 58, 0.35); color: var(--primary-deep); }
.chip.on { background: var(--ink); color: #FFFDF9; border-color: var(--ink); }
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

.toolbar {
  display: flex;
  gap: 10px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
}
.search span { color: var(--muted); font-size: 14px; }
.select {
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* ---------- 菜品卡 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.dish-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.dish-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.cover {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.55), transparent 62%);
}
.cover .emoji {
  position: relative;
  z-index: 1;
  font-size: 56px;
  filter: drop-shadow(0 6px 10px rgba(59, 49, 40, 0.18));
  transform: translateY(-2px);
}
.cover .cat {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  font-size: 10.5px;
  color: rgba(59, 49, 40, 0.72);
  background: rgba(255, 253, 249, 0.72);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.cover-count {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary-deep);
  background: rgba(255, 253, 249, 0.78);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 0; }
.g0 { background: linear-gradient(140deg, #F8D3B4, #E9A177); }
.g1 { background: linear-gradient(140deg, #D5E5D8, #A6C4AC); }
.g2 { background: linear-gradient(140deg, #F8E1A8, #E6BE74); }
.g3 { background: linear-gradient(140deg, #DDEBCB, #ACC98F); }
.g4 { background: linear-gradient(140deg, #F4D8E4, #DFB0C6); }
.g5 { background: linear-gradient(140deg, #F9E5BB, #EDC88D); }
.gx { background: linear-gradient(140deg, #EADFD2, #CDBBAA); }

.dish-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dish-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dish-name .heart {
  border: none;
  background: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  opacity: 0.32;
  transition: transform 0.16s, opacity 0.16s;
}
.dish-name .heart.on { opacity: 1; }
.dish-name .heart:hover { transform: scale(1.15); }
.dish-intro {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  min-height: 19px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  margin-top: auto;
  flex-wrap: wrap;
}
.dish-meta .dot { color: rgba(59, 49, 40, 0.28); }
.dish-meta .stat { color: var(--primary-deep); font-weight: 600; }

/* ---------- 首页 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  margin-bottom: 6px;
}
.hero-main {
  padding: 24px 24px 22px;
  border-radius: 26px;
  background: linear-gradient(150deg, #FFF9F0 0%, #F8E7D6 55%, #EFCFB4 100%);
  border: 1px solid rgba(210, 96, 58, 0.14);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-main::after {
  content: "🍚";
  position: absolute;
  right: -8px;
  bottom: -34px;
  font-size: 96px;
  opacity: 0.1;
  transform: rotate(-6deg);
}
.hero-main .hello {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.hero-main .sub { color: var(--ink-2); font-size: 13px; margin: 0 0 16px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.hero-side { display: grid; gap: 12px; }
.mini-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-ico {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 19px;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.mini-card b { display: block; font-size: 14px; }
.mini-card small { color: var(--muted); font-size: 12px; }

.alert-bar {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(210, 96, 58, 0.09);
  border: 1px solid rgba(210, 96, 58, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--primary-deep);
}
.alert-bar b { font-weight: 700; }
.alert-bar .go { margin-left: auto; font-size: 12.5px; color: var(--primary-deep); font-weight: 700; }

.hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: 0 0 190px; scroll-snap-align: start; }

/* ---------- 详情 ---------- */
.detail-head {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.detail-cover { position: relative; height: 210px; display: grid; place-items: center; }
.detail-cover .emoji { font-size: 82px; filter: drop-shadow(0 10px 16px rgba(59, 49, 40, 0.2)); }
.detail-info { background: var(--card); padding: 18px 20px 20px; }
.detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-title h1 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0;
  letter-spacing: 0.8px;
}
.detail-title .heart {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
}
.detail-desc { color: var(--muted); font-size: 13.5px; margin: 8px 0 14px; line-height: 1.6; }
.fact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.fact {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-soft);
  text-align: center;
}
.fact small { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.fact b { font-size: 13.5px; font-weight: 600; }

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  gap: 4px;
  margin-bottom: 14px;
}
.seg button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.panel { display: grid; gap: 12px; }

.ing-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ing-head {
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--olive);
  background: rgba(107, 122, 82, 0.07);
  display: flex;
  justify-content: space-between;
}
.ing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.ing-row:first-child { border-top: none; }
.ing-row .nm { flex: 1; }
.ing-row .amt { color: var(--muted); font-size: 12.5px; }

.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.2s, transform 0.2s;
}
.step-card .num {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(210, 96, 58, 0.12);
  color: var(--primary-deep);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}
.step-card .body { flex: 1; }
.step-card .body p { margin: 0; font-size: 14px; line-height: 1.7; }
.step-card .tip {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--olive);
  background: rgba(107, 122, 82, 0.1);
  padding: 3px 9px;
  border-radius: 999px;
}
.step-card .check {
  align-self: flex-start;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 49, 40, 0.18);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s;
}
.step-card .check.on {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.step-card.done { opacity: 0.55; }

.tip-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(107, 122, 82, 0.45);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 订单 ---------- */
.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.order-top { display: flex; align-items: center; gap: 10px; }
.order-emoji {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 21px;
  background: var(--bg-soft);
  flex-shrink: 0;
}
.order-title { flex: 1; min-width: 0; }
.order-title b { font-family: var(--serif); font-size: 16px; }
.order-title small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.order-note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 11px;
  line-height: 1.6;
}
.order-note.warn { background: rgba(210, 96, 58, 0.08); color: var(--primary-deep); }
.order-msg {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  padding-left: 2px;
}
.order-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ---------- 采购 ---------- */
.shop-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.shop-head {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(107, 122, 82, 0.07);
  font-size: 12px;
  font-weight: 700;
  color: var(--olive);
  letter-spacing: 1px;
}
.shop-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  transition: background 0.15s;
}
.shop-row:hover { background: rgba(59, 49, 40, 0.02); }
.shop-row .box {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(59, 49, 40, 0.16);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  color: transparent;
}
.shop-row .box.on { background: var(--olive); border-color: var(--olive); color: #fff; }
.shop-row .nm { flex: 1; }
.shop-row .amt { color: var(--muted); font-size: 12.5px; }
.shop-row .src { color: rgba(147, 136, 122, 0.9); font-size: 10.5px; margin-top: 2px; }
.shop-row.bought .nm, .shop-row.bought .amt { text-decoration: line-through; color: rgba(147, 136, 122, 0.8); }

/* ---------- 我的 ---------- */
.me-hero {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(140deg, #FFF9F1, #F6E7D5);
  border: 1px solid rgba(210, 96, 58, 0.14);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.me-avatar {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid; place-items: center;
  font-size: 28px;
  background: rgba(255, 253, 249, 0.8);
  border: 1px solid var(--line);
}
.me-hero b { font-family: var(--serif); font-size: 20px; }
.me-hero small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
}
.stat b { font-family: var(--serif); font-size: 22px; color: var(--primary-deep); }
.stat small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.list-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.list-row:first-child { border-top: none; }
.list-row .grow { flex: 1; }
.list-row .actions { display: flex; gap: 6px; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
}
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s, background 0.16s;
}
.field input:focus, .field textarea:focus { border-color: rgba(210, 96, 58, 0.5); background: #fff; }
.field textarea { resize: vertical; min-height: 62px; line-height: 1.6; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.rowline {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}
.rowline input, .rowline select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.rowline select { flex: 0 0 78px; }
.rowline .del {
  flex: 0 0 30px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(40, 32, 25, 0.42);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(40, 32, 25, 0.2);
  animation: up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 88vh;
  overflow-y: auto;
}
@keyframes up { from { transform: translateY(28px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 26px; padding-bottom: 22px; }
}
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h3 { font-family: var(--serif); font-size: 18px; margin: 0; flex: 1; }
.sheet-close {
  border: none;
  background: var(--bg-soft);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 15px;
}
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.member-tile {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s;
}
.member-tile:hover { border-color: rgba(210, 96, 58, 0.4); transform: translateY(-2px); }
.member-tile.on { border-color: var(--primary); background: #FFF6EF; }
.member-tile .av { font-size: 26px; display: block; margin-bottom: 6px; }
.member-tile b { font-size: 13.5px; }
.member-tile small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* ---------- 空状态 / 提示 ---------- */
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}
.empty .ico { font-size: 44px; display: block; margin-bottom: 10px; opacity: 0.7; }
.empty b { display: block; color: var(--ink-2); font-family: var(--serif); font-size: 15px; margin-bottom: 6px; }
.empty small { font-size: 12.5px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #FFFDF9;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s, transform 0.24s;
  z-index: 80;
  box-shadow: 0 10px 26px rgba(40, 32, 25, 0.24);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 底栏 ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--muted);
  transition: color 0.16s;
}
.tabbar a .ic { font-size: 19px; line-height: 1.2; filter: grayscale(0.35); transition: filter 0.16s, transform 0.16s; }
.tabbar a.on { color: var(--primary-deep); font-weight: 700; }
.tabbar a.on .ic { filter: none; transform: translateY(-1px); }

@media (min-width: 900px) {
  .nav { display: flex; }
  .tabbar { display: none; }
  .who { margin-left: 0; }
  .wrap { padding-bottom: 40px; }
  .hero-main .hello { font-size: 30px; }
  .detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
  .detail-head { position: sticky; top: 84px; margin-bottom: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .detail-cover { height: 176px; }
  .detail-cover .emoji { font-size: 66px; }
  .detail-title h1 { font-size: 23px; }
  .stat-row { gap: 8px; }
}

/* ---------- 菜谱编辑 ---------- */
.rowline textarea {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.ingline input[data-f="name"] { flex: 1 1 auto; }
.ingline input[data-f="amount"] { flex: 0 0 112px; }
.rowline textarea:focus { border-color: rgba(210, 96, 58, 0.5); background: #fff; }
.stepedit { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.stepedit:last-child { border-bottom: none; }
.stepno {
  flex: 0 0 22px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--primary-deep);
  font-weight: 700;
  text-align: center;
}
.tiprow { padding-left: 28px; }
.tiprow input { flex: 1; }
.detail-body { min-width: 0; }

/* ---------- 口令闸门 ---------- */
.gate-overlay { align-items: center; z-index: 80; background: rgba(40, 32, 25, 0.5); backdrop-filter: blur(10px); }
.gate-sheet {
  max-width: 400px;
  border-radius: 26px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(40, 32, 25, 0.28);
}
.gate-ico { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.gate-title { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; letter-spacing: 1px; }
.gate-sub { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.gate-input {
  height: 48px;
  font-size: 17px;
  text-align: center;
  letter-spacing: 3px;
  width: 100%;
}
.gate-err { height: 20px; font-size: 12.5px; color: var(--primary-deep); margin-top: 8px; }
@keyframes fmShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.shake { animation: fmShake 0.4s ease; }
@media (min-width: 640px) {
  .gate-overlay { align-items: center; }
}

