/* ================================================================
   点单中心 · 全局样式
   ================================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #ff5a2e;
  --primary-2: #ff9a3d;
  --primary-grad: linear-gradient(135deg, #ff9a3d 0%, #ff5a2e 100%);
  --primary-soft: #fff0e8;
  --primary-deep: #e0431a;
  --green: #21a565;
  --green-soft: #e4f6ec;
  --amber: #e89416;
  --amber-soft: #fdf3df;
  --red: #e5484d;
  --red-soft: #fdebeb;
  --bg: #f6f1ea;
  --card: #ffffff;
  --ink: #27211b;
  --ink-2: #9c9186;
  --ink-3: #c9c0b6;
  --line: #efe7dd;
  --shadow-s: 0 1px 6px rgba(80, 50, 20, .06);
  --shadow-m: 0 6px 24px rgba(80, 50, 20, .10);
  --shadow-l: 0 12px 40px rgba(80, 50, 20, .16);
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 22px;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; border: none; cursor: pointer; background: none; font-size: 1rem; color: inherit; }
input, textarea, select {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r-s);
  padding: 11px 14px; width: 100%; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 46, .12);
}
textarea { resize: none; }
::placeholder { color: var(--ink-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary-grad); color: #fff; font-weight: 600;
  border-radius: 999px; padding: 13px 26px;
  box-shadow: 0 4px 14px rgba(255, 90, 46, .3);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:active { transform: scale(.96); box-shadow: 0 2px 8px rgba(255, 90, 46, .25); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--primary-soft); color: var(--primary-deep); box-shadow: none; }
.btn.plain { background: #f1ece5; color: var(--ink); box-shadow: none; }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn.small { padding: 8px 15px; font-size: .85rem; }
.btn:disabled { opacity: .45; pointer-events: none; }
.link-btn { color: var(--ink-2); font-size: .875rem; padding: 4px 8px; }

/* ================================================================
   点单页
   ================================================================ */
.shell {
  max-width: 640px; margin: 0 auto;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ---------- 渐变头部 ---------- */
.hero {
  position: relative;
  background: var(--primary-grad);
  padding: max(20px, env(safe-area-inset-top)) 18px 30px;
  border-radius: 0 0 26px 26px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .12); pointer-events: none;
}
.hero::before { width: 190px; height: 190px; right: -60px; top: -90px; }
.hero::after { width: 120px; height: 120px; right: 70px; bottom: -70px; background: rgba(255, 255, 255, .08); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; }
.greet { font-size: .85rem; opacity: .92; margin-bottom: 2px; }
.hero h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: .5px; }
.hero-actions { display: flex; gap: 10px; }
.hero-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 14px; padding: 7px 12px;
  font-size: 1.25rem; line-height: 1.25; color: #fff;
  transition: transform .12s, background .12s;
  position: relative;
}
.hero-btn span { font-size: .66rem; opacity: .95; }
.hero-btn:active { transform: scale(.93); background: rgba(255, 255, 255, .3); }
.hero-btn .mini-badge {
  position: absolute; top: -5px; right: -5px;
  background: #fff; color: var(--primary-deep);
  font-size: .66rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; box-shadow: var(--shadow-s);
}

/* ---------- 搜索条 ---------- */
.search-wrap { position: relative; z-index: 2; margin-top: 16px; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow-m);
}
.search .icon { font-size: .95rem; opacity: .55; }
.search input {
  border: none; padding: 0; border-radius: 0; box-shadow: none !important;
  font-size: .92rem; background: transparent;
}
.search .clear-btn { color: var(--ink-3); font-size: .85rem; display: none; }
.search .clear-btn.show { display: block; }

/* ---------- 主体:左栏 + 菜品流 ---------- */
.body-flex { flex: 1; display: flex; overflow: hidden; }

.rail {
  width: 88px; flex-shrink: 0;
  overflow-y: auto; scrollbar-width: none;
  padding: 14px 0 120px;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 13px 6px;
  color: var(--ink-2); font-size: .8rem;
  position: relative;
  transition: color .15s;
}
.rail-item .r-emoji { font-size: 1.35rem; transition: transform .2s; }
.rail-item.active { color: var(--primary-deep); font-weight: 600; }
.rail-item.active .r-emoji { transform: scale(1.18); }
.rail-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 26px; border-radius: 0 4px 4px 0;
  background: var(--primary-grad);
}
.rail-item .r-count {
  position: absolute; top: 8px; right: 14px;
  background: var(--primary); color: #fff;
  font-size: .6rem; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.dishes {
  flex: 1; overflow-y: auto; scrollbar-width: none;
  padding: 14px 14px 130px 4px;
}
.dishes::-webkit-scrollbar { display: none; }

.sec-title {
  font-size: .85rem; font-weight: 700; color: var(--ink-2);
  margin: 18px 6px 10px; display: flex; align-items: center; gap: 6px;
}
.sec-title:first-child { margin-top: 2px; }

/* ---------- 菜品卡片(横向) ---------- */
.dish-card {
  display: flex; gap: 12px;
  background: var(--card); border-radius: var(--r-m);
  box-shadow: var(--shadow-s);
  padding: 10px; margin-bottom: 12px;
  animation: cardIn .35s both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.dish-pic {
  width: 92px; height: 92px; flex-shrink: 0;
  border-radius: var(--r-s); object-fit: cover;
  background: var(--primary-soft);
}
.dish-pic.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem;
}
.dish-pic.hue-0 { background: linear-gradient(135deg, #fff0e2, #ffddc2); }
.dish-pic.hue-1 { background: linear-gradient(135deg, #eaf6ea, #d3ecd6); }
.dish-pic.hue-2 { background: linear-gradient(135deg, #fdf1dc, #fbe3b5); }
.dish-pic.hue-3 { background: linear-gradient(135deg, #edf2fb, #d9e4f7); }
.dish-pic.hue-4 { background: linear-gradient(135deg, #fdeef0, #fad9de); }
.dish-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish-name { font-weight: 700; font-size: .98rem; }
.dish-desc {
  color: var(--ink-2); font-size: .78rem; margin-top: 2px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dish-foot { display: flex; align-items: center; justify-content: flex-end; margin-top: 6px; }

.add-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-grad); color: #fff;
  font-size: 1.2rem; font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(255, 90, 46, .35);
  transition: transform .12s;
}
.add-btn:active { transform: scale(.85); }

.stepper { display: flex; align-items: center; gap: 9px; }
.stepper button {
  width: 28px; height: 28px; border-radius: 50%; font-size: 1.05rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.stepper button:active { transform: scale(.85); }
.stepper .minus { background: var(--primary-soft); color: var(--primary-deep); }
.stepper .plus {
  background: var(--primary-grad); color: #fff;
  box-shadow: 0 3px 10px rgba(255, 90, 46, .35);
}
.stepper .qty { min-width: 18px; text-align: center; font-weight: 700; font-size: .95rem; }

/* ---------- 许愿卡 / 页脚 ---------- */
.wish-card {
  margin: 20px 2px 0;
  background: linear-gradient(135deg, #fffaf3, #fff2e4);
  border: 1.5px dashed #f4cfae;
  border-radius: var(--r-m);
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.wish-card .w-text { font-size: .85rem; color: #a8794a; }
.wish-card .w-text b { display: block; font-size: .95rem; color: #7d5628; }
.menu-footer { text-align: center; color: var(--ink-3); font-size: .75rem; padding: 26px 0 10px; }

/* ---------- 购物车悬浮条 ---------- */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: max(14px, env(safe-area-inset-bottom)); width: calc(100% - 28px); max-width: 612px; z-index: 40;
  background: #241e18; color: #fff; border-radius: 999px;
  display: flex; align-items: center; padding: 7px 7px 7px 8px;
  box-shadow: var(--shadow-l);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .25s;
}
.cart-bar.hidden { transform: translateX(-50%) translateY(130px); opacity: 0; pointer-events: none; }
.cart-icon-wrap {
  position: relative; width: 44px; height: 44px;
  background: var(--primary-grad); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-right: 12px; flex-shrink: 0;
}
.cart-icon-wrap.bump { animation: bump .4s; }
@keyframes bump {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.22) rotate(-8deg); }
  70% { transform: scale(.95); }
}
.cart-badge {
  position: absolute; top: -4px; right: -6px;
  background: #fff; color: var(--primary-deep);
  border-radius: 999px; min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; padding: 0 5px;
  box-shadow: var(--shadow-s);
}
.cart-bar .cart-label { flex: 1; font-size: .92rem; font-weight: 500; }
.cart-bar .cart-label small { display: block; font-size: .7rem; color: #9b938b; font-weight: 400; }
.cart-bar .btn { padding: 11px 24px; }

/* ---------- 弹层通用 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(35, 22, 10, .5);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.overlay.sheet-wrap { align-items: flex-end; padding: 0; }

.modal {
  background: #fff; border-radius: var(--r-l); padding: 24px 22px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-l);
  transform: scale(.92) translateY(10px); transition: transform .25s cubic-bezier(.34, 1.4, .64, 1);
}
.overlay.show .modal { transform: none; }
.modal h3 { font-size: 1.12rem; margin-bottom: 16px; }
.modal .field { margin-bottom: 13px; }
.modal .field label, .sheet .field label {
  display: block; font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 500;
}

.sheet {
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  width: 100%; max-width: 640px; max-height: 84vh; overflow-y: auto;
  transform: translateY(60px); transition: transform .28s cubic-bezier(.34, 1.3, .64, 1);
}
.overlay.show .sheet { transform: none; }
.sheet::before {
  content: ''; display: block; width: 40px; height: 4px;
  background: var(--line); border-radius: 999px; margin: 4px auto 14px;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h3 { font-size: 1.12rem; }

.cart-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item .ci-pic { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cart-item .ci-pic.placeholder {
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--primary-soft);
}
.cart-item .ci-name { flex: 1; font-weight: 600; font-size: .92rem; }

/* ---------- 我的订单 ---------- */
.my-order {
  background: #fbf8f4; border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 13px 15px; margin-bottom: 11px;
}
.mo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.mo-no { font-weight: 700; font-size: .92rem; }
.mo-items { color: var(--ink-2); font-size: .82rem; }
.mo-time { color: var(--ink-3); font-size: .72rem; margin-top: 5px; }

.status-tag {
  font-size: .74rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
}
.status-tag.new { background: var(--primary-soft); color: var(--primary-deep); }
.status-tag.cooking { background: var(--amber-soft); color: var(--amber); }
.status-tag.done { background: var(--green-soft); color: var(--green); }
.status-tag.canceled { background: #f1ece5; color: var(--ink-2); }
.status-tag.cooking .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  animation: pulse 1.1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

/* ---------- 随机推荐 ---------- */
.random-box { text-align: center; }
.random-stage {
  width: 108px; height: 108px; margin: 8px auto 14px;
  background: var(--primary-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem;
  position: relative;
}
.random-stage::before {
  content: ''; position: absolute; inset: -7px;
  border-radius: 50%;
  border: 2.5px dashed #ffc5ab;
  animation: spin 7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.random-stage.rolling { animation: shake .5s infinite; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}
.random-name { font-size: 1.4rem; font-weight: 800; min-height: 2em; }
.random-name.rolling { color: var(--ink-3); font-weight: 500; }
.random-desc { color: var(--ink-2); font-size: .85rem; min-height: 1.5em; margin: 3px 0 18px; }
.random-actions { display: flex; gap: 10px; }
.random-actions .btn { flex: 1; }

/* ---------- 成功弹窗 + 彩纸 ---------- */
.success-box { text-align: center; padding: 8px 0; position: relative; overflow: visible; }
.success-box .big { font-size: 3.4rem; animation: pop .5s cubic-bezier(.34, 1.8, .64, 1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.success-box h3 { margin: 10px 0 4px; }
.success-box p { color: var(--ink-2); font-size: .9rem; margin-bottom: 20px; }
.confetti { position: absolute; inset: -30px 0 auto; height: 0; pointer-events: none; }
.confetti i {
  position: absolute; top: 0; width: 8px; height: 12px; border-radius: 2px;
  opacity: 0;
}
.overlay.show .confetti i { animation: fall 1.6s ease-out both; }
@keyframes fall {
  0% { opacity: 1; transform: translateY(-10px) rotate(0); }
  100% { opacity: 0; transform: translateY(150px) rotate(340deg); }
}
.confetti i:nth-child(1) { left: 8%; background: #ff9a3d; animation-delay: .05s; }
.confetti i:nth-child(2) { left: 22%; background: #57c98a; animation-delay: .2s; }
.confetti i:nth-child(3) { left: 36%; background: #ffd45e; animation-delay: 0s; }
.confetti i:nth-child(4) { left: 50%; background: #ff5a2e; animation-delay: .28s; }
.confetti i:nth-child(5) { left: 64%; background: #6ea8f7; animation-delay: .12s; }
.confetti i:nth-child(6) { left: 78%; background: #f27fa5; animation-delay: .22s; }
.confetti i:nth-child(7) { left: 90%; background: #ffd45e; animation-delay: .08s; }
.confetti i:nth-child(8) { left: 15%; background: #6ea8f7; animation-delay: .34s; }
.confetti i:nth-child(9) { left: 70%; background: #57c98a; animation-delay: .4s; }
.confetti i:nth-child(10) { left: 44%; background: #f27fa5; animation-delay: .45s; }

/* ---------- Toast / 空状态 / 骨架 ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 99;
  background: rgba(36, 30, 24, .93); color: #fff;
  padding: 11px 20px; border-radius: 999px; font-size: .9rem;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
  max-width: 82vw; text-align: center;
  box-shadow: var(--shadow-m);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.empty { text-align: center; color: var(--ink-2); padding: 46px 0; font-size: .9rem; }
.empty .e-icon { font-size: 2.6rem; display: block; margin-bottom: 8px; }

.skeleton { border-radius: var(--r-m); background: #fff; padding: 10px; display: flex; gap: 12px; margin-bottom: 12px; }
.skeleton .sk-pic, .skeleton .sk-line {
  background: linear-gradient(90deg, #f2ede6 25%, #faf6f0 50%, #f2ede6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton .sk-pic { width: 92px; height: 92px; flex-shrink: 0; }
.skeleton .sk-body { flex: 1; padding-top: 6px; }
.skeleton .sk-line { height: 14px; margin-bottom: 10px; }
.skeleton .sk-line.short { width: 55%; }

/* ================================================================
   管理后台
   ================================================================ */
.admin-shell { max-width: 640px; margin: 0 auto; padding-bottom: 60px; }

.admin-hero {
  background: linear-gradient(135deg, #33291f 0%, #55402c 100%);
  color: #fff;
  padding: max(18px, env(safe-area-inset-top)) 18px 46px;
  border-radius: 0 0 26px 26px;
  position: relative; overflow: hidden;
}
.admin-hero::before {
  content: '🍳'; position: absolute; font-size: 7rem; right: -14px; top: -6px;
  opacity: .1; transform: rotate(12deg);
}
.admin-hero .bar { display: flex; align-items: center; justify-content: space-between; position: relative; }
.admin-hero h1 { font-size: 1.3rem; }
.admin-hero .sub { font-size: .8rem; opacity: .75; }
.icon-btn { font-size: 1.3rem; padding: 6px; }

.tab-nav {
  display: flex; gap: 4px; background: #fff; border-radius: 999px; padding: 5px;
  margin: -28px 16px 14px; box-shadow: var(--shadow-m);
  position: relative; z-index: 5;
}
.tab-nav button {
  flex: 1; padding: 10px 0; border-radius: 999px; font-size: .9rem; color: var(--ink-2);
  position: relative; font-weight: 600; transition: color .15s;
}
.tab-nav button.active { background: var(--primary-grad); color: #fff; box-shadow: 0 3px 10px rgba(255, 90, 46, .3); }
.tab-nav .dot {
  position: absolute; top: 5px; right: 14%; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red); display: none;
  border: 2px solid #fff;
}
.tab-nav .dot.show { display: block; }

.tab-panel { display: none; padding: 4px 16px; animation: cardIn .3s both; }
.tab-panel.active { display: block; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; align-items: center; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 15px; border-radius: 999px; font-size: .85rem; font-weight: 500;
  background: #fff; color: var(--ink-2); box-shadow: var(--shadow-s);
  transition: all .15s;
}
.chip.active { background: #241e18; color: #fff; }
.chips .spacer { flex: 1; min-width: 4px; }

/* 订单卡片 */
.order-card {
  background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow-s);
  padding: 15px 16px; margin-bottom: 12px;
  animation: cardIn .3s both;
}
.order-card.status-new { box-shadow: var(--shadow-s), inset 4px 0 0 var(--primary); }
.order-card.status-cooking { box-shadow: var(--shadow-s), inset 4px 0 0 var(--amber); }
.oc-head { display: flex; justify-content: space-between; align-items: baseline; }
.oc-head .who { font-weight: 700; font-size: 1.02rem; }
.oc-head .no { color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.oc-time { color: var(--ink-3); font-size: .76rem; margin-bottom: 9px; }
.oc-items {
  background: #faf7f2; border-radius: var(--r-s); padding: 9px 12px; margin-bottom: 9px;
  font-size: .92rem;
}
.oc-items li { list-style: none; display: flex; justify-content: space-between; padding: 3px 0; }
.oc-items .q { color: var(--ink-2); font-weight: 600; }
.oc-note {
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: .82rem; border-radius: var(--r-s); padding: 7px 11px; margin-bottom: 9px;
}
.oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.oc-actions { display: flex; gap: 8px; }

/* 菜单管理 */
.mgr-row {
  background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow-s);
  padding: 11px 13px; margin-bottom: 11px;
  display: flex; align-items: center; gap: 13px;
  animation: cardIn .3s both;
}
.mgr-thumb {
  width: 58px; height: 58px; border-radius: var(--r-s); object-fit: cover; flex-shrink: 0;
  background: var(--primary-soft);
}
.mgr-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.mgr-info { flex: 1; min-width: 0; }
.mgr-info .name { font-weight: 700; font-size: .95rem; }
.mgr-info .name .off { color: var(--ink-2); font-weight: 400; font-size: .76rem; }
.mgr-info .desc {
  color: var(--ink-2); font-size: .78rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mgr-ops { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.mgr-row.off-shelf { opacity: .55; }

.cat-manage-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.cat-manage-bar .spacer { flex: 1; }

.img-pick {
  width: 100%; aspect-ratio: 16 / 7; border-radius: var(--r-s);
  border: 2px dashed var(--line);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  color: var(--ink-2); font-size: .85rem; gap: 4px; overflow: hidden; cursor: pointer;
  background: #fdfbf8; transition: border-color .15s;
}
.img-pick:active { border-color: var(--primary); }
.img-pick img { width: 100%; height: 100%; object-fit: cover; }

/* 愿望单 */
.wish-row {
  background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow-s);
  padding: 13px 15px; margin-bottom: 11px;
  display: flex; align-items: center; gap: 12px;
  animation: cardIn .3s both;
}
.wish-row .w-info { flex: 1; min-width: 0; }
.wish-row .w-dish { font-weight: 700; }
.wish-row.done .w-dish { text-decoration: line-through; color: var(--ink-2); }
.wish-row .w-meta { color: var(--ink-3); font-size: .76rem; }

/* 统计 */
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-card {
  border-radius: var(--r-m); padding: 18px 16px; text-align: center;
  color: #fff; box-shadow: var(--shadow-m);
}
.stat-card.c1 { background: var(--primary-grad); }
.stat-card.c2 { background: linear-gradient(135deg, #4c5b7c, #33291f); }
.stat-card .num { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.stat-card .label { font-size: .78rem; opacity: .85; }
.rank-list { background: #fff; border-radius: var(--r-m); box-shadow: var(--shadow-s); padding: 18px 16px; }
.rank-list h3 { font-size: .98rem; margin-bottom: 14px; }
.rank-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: .88rem; }
.rank-row .r-idx { width: 24px; text-align: center; font-weight: 800; color: var(--ink-3); font-style: italic; }
.rank-row .r-idx.top { color: var(--primary); }
.rank-row .r-name { width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.rank-row .r-bar-wrap { flex: 1; background: #f3eee7; border-radius: 999px; height: 12px; overflow: hidden; }
.rank-row .r-bar {
  height: 100%; background: var(--primary-grad); border-radius: 999px;
  animation: grow .6s ease-out both;
}
@keyframes grow { from { width: 0 !important; } }
.rank-row .r-count { width: 36px; text-align: right; color: var(--ink-2); font-size: .8rem; font-weight: 600; }

/* 登录 */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 154, 61, .16), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 90, 46, .13), transparent 45%),
    var(--bg);
}
.login-card {
  background: #fff; border-radius: var(--r-l); box-shadow: var(--shadow-l);
  padding: 36px 26px; width: 100%; max-width: 360px; text-align: center;
}
.login-card .logo {
  width: 76px; height: 76px; margin: 0 auto 10px;
  background: var(--primary-grad); border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; box-shadow: 0 8px 20px rgba(255, 90, 46, .35);
}
.login-card h1 { font-size: 1.25rem; margin-bottom: 4px; }
.login-card .sub { color: var(--ink-2); font-size: .82rem; margin-bottom: 22px; }
.login-card .field { margin-bottom: 14px; text-align: left; }
