/* ============================================================
 * 家庭厨房在线菜单系统 — 视觉样式
 * 关键词：温馨 · 美食 · 生活记录
 * ============================================================ */

:root {
  --bg: #FBF6EE;
  --bg-deep: #F5EDE1;
  --surface: #FFFFFF;
  --ink: #3B3129;
  --ink-2: #6B5F53;
  --muted: #9C8F81;
  --line: #EEE4D5;
  --primary: #D2664B;
  --primary-deep: #B34F36;
  --primary-soft: #FBEAE3;
  --green: #5E9E52;
  --green-soft: #EAF3E6;
  --gold: #D6A03C;
  --gold-soft: #FBF0D8;
  --blue: #3E88A6;
  --blue-soft: #E3F0F5;
  --brown: #A9805F;
  --brown-soft: #F5EDE4;
  --shadow-sm: 0 2px 8px rgba(120, 95, 70, .06);
  --shadow: 0 6px 24px rgba(120, 95, 70, .10);
  --shadow-lg: 0 16px 48px rgba(120, 95, 70, .16);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  padding-top: 68px;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(210, 102, 75, .07), transparent 60%),
    radial-gradient(800px 460px at 92% 4%, rgba(214, 160, 60, .09), transparent 60%);
  pointer-events: none; z-index: 0;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------------- 顶部导航 ---------------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: 68px; z-index: 100;
  background: rgba(255, 253, 249, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 22px;
  padding: 0 28px;
}
.logo { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: .5px; flex-shrink: 0; }
.logo .ico { font-size: 24px; }
.logo span.t { background: linear-gradient(120deg, var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 9px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap; transition: .22s;
}
.nav-links a:hover { background: var(--bg-deep); color: var(--ink); }
.nav-links a.active { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(210, 102, 75, .3); }
.nav-links a .badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
  background: var(--gold); color: #fff; border-radius: 999px; font-size: 11px; margin-left: 5px; text-align: center;
}
.nav-links a.active .badge { background: rgba(255,255,255,.9); color: var(--primary); }

.nav-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-user .who {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm);
}
.nav-user .av { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-size: 16px; }
.nav-user .nm { font-size: 13.5px; font-weight: 700; }
.nav-user .rl { font-size: 11px; color: #fff; background: var(--green); padding: 1px 7px; border-radius: 999px; }
.nav-user .rl.host { background: var(--primary); }

/* ---------------- 通用组件 ---------------- */
.page { max-width: 1180px; margin: 0 auto; padding: 30px 24px 80px; position: relative; z-index: 1; animation: fadeUp .38s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  background: var(--primary); color: #fff; transition: .2s; box-shadow: 0 4px 14px rgba(210, 102, 75, .26);
}
.btn:hover { background: var(--primary-deep); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(210, 102, 75, .32); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--bg-deep); }
.btn.green { background: var(--green); box-shadow: 0 4px 14px rgba(94, 158, 82, .26); }
.btn.green:hover { background: #4E8944; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

.sec-title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sec-title h2 { font-size: 25px; font-weight: 800; letter-spacing: .3px; }
.sec-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-deep); color: var(--ink-2); }
.tag.meat { background: var(--primary-soft); color: var(--primary-deep); }
.tag.seafood { background: var(--blue-soft); color: var(--blue); }
.tag.veg { background: var(--green-soft); color: var(--green); }
.tag.soup { background: var(--gold-soft); color: #A8781F; }
.tag.staple { background: var(--brown-soft); color: #83603F; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .e { font-size: 46px; display: block; margin-bottom: 10px; opacity: .65; }

/* ---------------- 首页 Hero ---------------- */
.hero {
  background: linear-gradient(135deg, #FFF9F1 0%, #FDF1E5 55%, #FBEAE3 100%);
  border: 1px solid var(--line); border-radius: 28px; padding: 40px 44px;
  display: flex; align-items: center; gap: 30px; margin-bottom: 34px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero::after { content: '🍳'; position: absolute; right: -14px; bottom: -30px; font-size: 168px; opacity: .07; transform: rotate(-12deg); }
.hero .h-txt { flex: 1; position: relative; z-index: 1; }
.hero h1 { font-size: 38px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }
.hero p { color: var(--ink-2); font-size: 15.5px; max-width: 560px; }
.hero .h-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 14px; position: relative; z-index: 1; }
.stat { background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 22px; text-align: center; min-width: 104px; }
.stat .n { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat .l { font-size: 12.5px; color: var(--muted); }

/* ---------------- 菜品卡片 ---------------- */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 22px; }
.dish-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .26s; cursor: pointer; display: flex; flex-direction: column;
}
.dish-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #E4D5BF; }
.dish-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-deep); }
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.dish-card:hover .dish-thumb img { transform: scale(1.06); }
.dish-thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 54px; background: linear-gradient(135deg, #F7EDE0, #F1E2CE); }
.dish-thumb .cat-badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff; backdrop-filter: blur(6px); background: rgba(0,0,0,.42);
}
.dish-thumb .fav { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: 15px; }
.dish-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.dish-body h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 5px; }
.dish-body .intro { font-size: 13px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.dish-meta { display: flex; gap: 14px; margin-top: 11px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.dish-meta span { display: inline-flex; align-items: center; gap: 4px; }
.dish-tags { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.dish-actions { display: flex; gap: 8px; margin-top: 14px; }
.dish-actions .btn { flex: 1; }

/* ---------------- 实时看板 ---------------- */
.board { display: grid; grid-template-columns: 1.35fr .95fr; gap: 22px; margin-bottom: 34px; }
.board-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.board-head h3 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4CAF50; box-shadow: 0 0 0 0 rgba(76,175,80,.6); animation: pulse 1.9s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(76,175,80,0); } 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); } }

.order-list { display: flex; flex-direction: column; gap: 11px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.order-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); transition: .2s;
}
.order-item.flash { animation: flashIn .9s ease; }
@keyframes flashIn { 0% { background: #FFF3C4; transform: scale(1.015); } 100% { background: var(--bg); transform: none; } }
.order-item .av { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.order-item .info { flex: 1; min-width: 0; }
.order-item .info .u { font-size: 13px; color: var(--muted); }
.order-item .info .d { font-weight: 700; font-size: 15px; }
.order-item .info .note { font-size: 12px; color: var(--gold); margin-top: 2px; }
.order-item .pp { background: var(--primary); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12.5px; font-weight: 700; flex-shrink: 0; }
.order-item .del { color: var(--muted); font-size: 17px; padding: 2px 6px; border-radius: 6px; }
.order-item .del:hover { background: var(--primary-soft); color: var(--primary); }

.people-summary { display: flex; flex-direction: column; gap: 12px; }
.people-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg); border-radius: var(--r-md); border: 1px solid var(--line); }
.people-chip .av { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; font-size: 16px; }
.people-chip .nm { font-weight: 700; flex: 1; }
.people-chip .ct { font-size: 12.5px; color: var(--muted); }

.big-count { text-align: center; padding: 22px 0 8px; }
.big-count .n { font-size: 56px; font-weight: 800; color: var(--primary); line-height: 1; }
.big-count .l { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------------- 菜单页 ---------------- */
.menu-layout { display: grid; grid-template-columns: 208px 1fr; gap: 26px; align-items: start; }
.cat-nav { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.cat-nav h4 { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; margin: 4px 8px 10px; font-weight: 700; }
.cat-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--r-md);
  cursor: pointer; transition: .2s; margin-bottom: 4px; font-weight: 700; font-size: 14.5px; width: 100%; text-align: left;
}
.cat-item .e { font-size: 19px; }
.cat-item .c { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.cat-item:hover { background: var(--bg-deep); }
.cat-item.active { color: #fff; }
.cat-item.active .c { color: rgba(255,255,255,.85); }

.menu-toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 220px; position: relative; }
.search-box input {
  width: 100%; padding: 11px 16px 11px 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); outline: none; box-shadow: var(--shadow-sm); transition: .2s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-box .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------------- 详情页 ---------------- */
.detail-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; margin-bottom: 30px; }
.detail-hero .pic { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; background: var(--bg-deep); }
.detail-hero .pic img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .pic .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 96px; background: linear-gradient(135deg, #F7EDE0, #F1E2CE); }
.detail-hero h1 { font-size: 34px; font-weight: 800; margin: 6px 0 10px; }
.detail-hero .intro { color: var(--ink-2); font-size: 15px; margin-bottom: 16px; }
.detail-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 16px; text-align: center; min-width: 84px; }
.fact .v { font-weight: 800; font-size: 16px; }
.fact .k { font-size: 11.5px; color: var(--muted); }
.tip-box { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 11px 15px; font-size: 13.5px; color: #7A5A16; }

.step-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.step-block > .sh { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-block > .sh .num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.step-block > .sh h3 { font-size: 19px; font-weight: 800; }
.step-block > .sh .hint { margin-left: auto; font-size: 13px; color: var(--muted); }

.people-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.pp-btn {
  min-width: 62px; padding: 13px 8px; border-radius: var(--r-md); border: 2px solid var(--line);
  background: var(--surface); font-weight: 800; font-size: 15px; transition: .2s; text-align: center;
}
.pp-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.pp-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(210,102,75,.3); transform: translateY(-2px); }
.pp-btn small { display: block; font-size: 11px; font-weight: 600; opacity: .75; }

.ing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ing-col h4 { font-size: 14px; color: var(--muted); letter-spacing: .8px; margin-bottom: 12px; font-weight: 700; }
.ing-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--bg); margin-bottom: 8px; border: 1px solid transparent; transition: .2s;
}
.ing-row:hover { border-color: var(--line); }
.ing-row .nm { flex: 1; font-weight: 600; }
.ing-row .qt { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.ing-row .qt.any { color: var(--muted); font-weight: 600; }

.steps-list { display: flex; flex-direction: column; gap: 14px; }
.step-card { display: flex; gap: 16px; padding: 17px 19px; background: var(--bg); border-radius: var(--r-md); border: 1px solid var(--line); transition: .2s; }
.step-card:hover { background: #fff; box-shadow: var(--shadow-sm); }
.step-card .idx {
  width: 42px; height: 42px; border-radius: 13px; background: var(--primary-soft); color: var(--primary-deep);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.step-card .sc-body h5 { font-size: 15.5px; font-weight: 800; margin-bottom: 3px; }
.step-card .sc-body p { font-size: 14px; color: var(--ink-2); }
.step-card .sn { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }

.video-area { background: var(--bg); border: 2px dashed var(--line); border-radius: var(--r-md); padding: 30px; text-align: center; }
.video-area .pl { font-size: 44px; margin-bottom: 8px; }
.video-area .row { display: flex; gap: 10px; margin-top: 16px; max-width: 560px; margin-inline: auto; }
.video-area input { flex: 1; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); outline: none; background: #fff; }
.video-wrap { border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.video-wrap video, .video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.sticky-cta {
  position: sticky; bottom: 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px 12px 24px;
  display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-lg); margin-top: 26px;
}
.sticky-cta .txt { flex: 1; font-size: 14px; }
.sticky-cta .txt b { color: var(--primary); }

/* ---------------- 采购清单 ---------------- */
.shop-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.shop-group { margin-bottom: 26px; }
.shop-group h4 { font-size: 14px; color: var(--muted); letter-spacing: 1px; margin-bottom: 12px; font-weight: 700; }
.shop-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 9px; transition: .2s;
}
.shop-row:hover { box-shadow: var(--shadow-sm); }
.shop-row.done { opacity: .5; background: var(--bg-deep); }
.shop-row.done .nm { text-decoration: line-through; }
.chk {
  width: 23px; height: 23px; border-radius: 7px; border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; transition: .18s; color: transparent; font-size: 13px; font-weight: 900;
}
.chk:hover { border-color: var(--green); }
.chk.on { background: var(--green); border-color: var(--green); color: #fff; }
.shop-row .nm { font-weight: 700; min-width: 96px; }
.shop-row .src { font-size: 12px; color: var(--muted); flex: 1; }
.shop-row .qty-in {
  width: 78px; padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line);
  text-align: right; font-weight: 800; color: var(--primary); background: var(--bg); outline: none;
}
.shop-row .qty-in:focus { border-color: var(--primary); background: #fff; }
.shop-row .unit { font-size: 13px; color: var(--muted); min-width: 34px; }
.shop-row .rm { color: var(--muted); font-size: 17px; padding: 3px 7px; border-radius: 7px; }
.shop-row .rm:hover { background: var(--primary-soft); color: var(--primary); }
.shop-row .edited-flag { font-size: 11px; color: var(--gold); font-weight: 700; }

.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px; position: sticky; top: 88px; }
.side-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.progress-ring { text-align: center; margin-bottom: 14px; }
.progress-bar { height: 9px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #86C47A); border-radius: 999px; transition: width .5s ease; }
.menu-summary-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.menu-summary-row:last-child { border: 0; }
.menu-summary-row .e { font-size: 17px; }
.menu-summary-row .n { flex: 1; font-weight: 600; }
.menu-summary-row .p { color: var(--primary); font-weight: 800; font-size: 13px; }

.add-extra { display: flex; gap: 8px; margin-bottom: 18px; }
.add-extra input { padding: 10px 13px; border-radius: var(--r-sm); border: 1px solid var(--line); outline: none; background: var(--surface); }
.add-extra input.n { flex: 1; }
.add-extra input.q { width: 74px; }
.add-extra input.u { width: 66px; }

/* ---------------- 美食打卡 ---------------- */
.diary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 22px; }
.diary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: .25s; }
.diary-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.diary-card .ph { aspect-ratio: 4/3; background: var(--bg-deep); overflow: hidden; }
.diary-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.diary-card .ph .none { width: 100%; height: 100%; display: grid; place-items: center; font-size: 46px; background: linear-gradient(135deg, #F7EDE0, #F1E2CE); }
.diary-card .bd { padding: 15px 17px 17px; }
.diary-card .bd .top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.diary-card .bd h4 { font-size: 16.5px; font-weight: 800; flex: 1; }
.diary-card .stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.diary-card .cm { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.diary-card .ft { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.diary-card .ft .del { margin-left: auto; padding: 2px 8px; border-radius: 6px; }
.diary-card .ft .del:hover { background: var(--primary-soft); color: var(--primary); }

.star-picker { display: flex; gap: 5px; font-size: 27px; }
.star-picker span { cursor: pointer; filter: grayscale(1); opacity: .35; transition: .18s; }
.star-picker span.on { filter: none; opacity: 1; transform: scale(1.08); }

.upload-zone {
  border: 2px dashed var(--line); border-radius: var(--r-md); padding: 26px; text-align: center;
  background: var(--bg); cursor: pointer; transition: .2s;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone .ic { font-size: 38px; margin-bottom: 6px; }
.upload-preview { border-radius: var(--r-md); overflow: hidden; max-height: 220px; }
.upload-preview img { width: 100%; object-fit: cover; max-height: 220px; }

/* ---------------- 表单 / 后台 ---------------- */
.form-row { margin-bottom: 15px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); outline: none; transition: .2s;
}
.form-row textarea { resize: vertical; min-height: 90px; font-size: 13.5px; line-height: 1.7; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-row .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab { padding: 11px 20px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; transition: .2s; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 13px 16px; font-size: 12.5px; color: var(--muted); background: var(--bg); font-weight: 700; letter-spacing: .5px; }
td { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tr:hover td { background: #FEFBF6; }
td .mini-img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
td .ops { display: flex; gap: 6px; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(59, 49, 41, .5); backdrop-filter: blur(4px);
  z-index: 300; display: grid; place-items: center; padding: 24px; animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: 24px; width: 100%; max-width: 520px; max-height: 88vh;
  overflow-y: auto; box-shadow: var(--shadow-lg); animation: popIn .28s cubic-bezier(.2,.9,.3,1.2);
}
.modal.wide { max-width: 760px; }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-head { padding: 22px 26px 0; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 20px; font-weight: 800; flex: 1; }
.modal-head .x { font-size: 22px; color: var(--muted); padding: 2px 8px; border-radius: 8px; }
.modal-head .x:hover { background: var(--bg-deep); }
.modal-body { padding: 18px 26px; }
.modal-foot { padding: 6px 26px 24px; display: flex; gap: 10px; justify-content: flex-end; }

.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker button {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg); border: 2px solid transparent;
  font-size: 21px; display: grid; place-items: center; transition: .18s;
}
.avatar-picker button:hover { background: var(--bg-deep); }
.avatar-picker button.on { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.06); }

.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-opt { border: 2px solid var(--line); border-radius: var(--r-md); padding: 15px; text-align: center; transition: .2s; }
.role-opt:hover { border-color: var(--primary); }
.role-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.role-opt .e { font-size: 30px; display: block; margin-bottom: 4px; }
.role-opt .t { font-weight: 800; }
.role-opt .d { font-size: 11.5px; color: var(--muted); }

/* ---------------- 提示条 ---------------- */
.toast-wrap { position: fixed; top: 84px; right: 24px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: var(--r-md); padding: 13px 18px; box-shadow: var(--shadow-lg); min-width: 240px; max-width: 340px;
  animation: slideIn .32s cubic-bezier(.2,.9,.3,1.2); font-size: 14px;
}
.toast.warn { border-left-color: var(--gold); }
.toast.info { border-left-color: var(--primary); }
.toast b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.toast .sub { font-size: 13px; color: var(--muted); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.toast.out { animation: slideOut .3s forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .board { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .menu-layout { grid-template-columns: 1fr; }
  .cat-nav { position: static; display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
  .cat-nav h4 { display: none; }
  .cat-item { margin-bottom: 0; white-space: nowrap; width: auto; }
  .cat-item .c { display: none; }
  .hero { flex-direction: column; align-items: flex-start; padding: 30px 26px; }
  .ing-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
/* ---------------- 热量提示 ---------------- */
.calorie-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--gold-soft); border: 1px solid #F0D9A8; border-radius: var(--r-md);
  padding: 12px 16px; margin-top: 16px; font-size: 14px; color: #7A5A16;
}
.calorie-bar b { font-size: 18px; color: var(--gold); }
.calorie-bar small { color: var(--muted); }

.calorie-summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; margin-top: 14px;
}
.calorie-summary .row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 4px 0; }
.calorie-summary .row b { color: var(--primary); font-size: 16px; }
.calorie-summary .note { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---------------- 移动端底部 Tab（小程序感） ---------------- */
.bottom-nav { display: none; }

@media (max-width: 760px) {
  .navbar { padding: 0 14px; gap: 10px; }
  .nav-links { display: none; }
  .nav-user { margin-left: auto; }
  body { padding-bottom: 66px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    background: rgba(255, 253, 249, .96); backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px; font-size: 11px; color: var(--muted); border-radius: 12px; position: relative;
  }
  .bottom-nav a .bi { font-size: 20px; line-height: 1; }
  .bottom-nav a.active { color: var(--primary); background: var(--primary-soft); }
  .bottom-nav a .badge {
    position: absolute; top: 1px; left: 50%; margin-left: 6px;
    min-width: 16px; height: 16px; line-height: 16px; padding: 0 4px;
    background: var(--gold); color: #fff; border-radius: 999px; font-size: 10px; text-align: center;
  }
  .bottom-nav a.active .badge { background: rgba(210,102,75,.95); color: #fff; }
}

@media (max-width: 640px) {
  body { padding-top: 60px; }
  .navbar { height: 60px; }
  .logo { font-size: 16px; }
  .nav-user .nm, .nav-user .rl { display: none; }
  .page { padding: 20px 14px 8px; }
  .hero h1 { font-size: 27px; }
  .hero-stats { flex-wrap: wrap; }
  .dish-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .detail-hero h1 { font-size: 26px; }
  .toast-wrap { left: 14px; right: 14px; top: 70px; }
  .toast { max-width: none; }
}
