﻿/* ============ 情侣菜单 - 样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #E84C6B;
  --primary-dark: #D63B5C;
  --primary-soft: #FDE9EE;
  --bg: #FAF6F7;
  --card: #FFFFFF;
  --text: #33272B;
  --text-2: #9C8F94;
  --border: #F0E6E9;
  --danger: #E5484D;
  --star: #FFB800;
  --green: #2E9E5B;
  --blue: #4A90D9;
  --amber: #E8A13C;
  --tab-h: 56px;
  --radius: 16px;
}

html { height: 100%; }
body {
  height: 100%;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  /* 禁止双指捏合缩放与双击放大,保留滚动 */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px);
}

.hidden { display: none !important; }

/* ============ 按钮点击过渡动画 ============ */
button {
  font-family: inherit; touch-action: manipulation; cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, color .2s ease, opacity .2s ease;
}
button:active { transform: scale(.94); }
.tab, .chip, .opt-chip, .card, .theme-item {
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tab:active, .chip:active, .opt-chip:active, .card:active, .theme-item:active,
.tab.pressed, .chip.pressed, .opt-chip.pressed, .card.pressed, .theme-item.pressed,
.dyn-del.pressed, .qty-btn.pressed { transform: scale(.94); }
.view { animation: viewIn .22s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

input, select, textarea { font-family: inherit; font-size: 16px; color: var(--text); }
img { display: block; }

/* ============ 顶部栏 ============ */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--bg);
}
.app-header h1 { font-size: 22px; font-weight: 700; }
.header-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.icon-btn {
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--card); font-size: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.icon-btn:active { transform: scale(.92); }

.sub-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--bg);
}
.sub-header h2 { font-size: 18px; flex: 1; }
.text-btn { border: none; background: none; font-size: 16px; color: var(--text-2); padding: 8px; }
.text-btn.primary { color: var(--primary); font-weight: 600; }

/* ============ 搜索 / 分类 ============ */
.search-box { padding: 0 20px 12px; }
.search-box input {
  width: 100%; height: 44px; padding: 0 16px;
  border: none; border-radius: 22px; background: var(--card);
  font-size: 16px; outline: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  -webkit-appearance: none; appearance: none;
}

.chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 20px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 16px;
  border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); color: var(--text-2); font-size: 14px;
  white-space: nowrap;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip.static { pointer-events: none; }

/* ============ 海报与今日推荐 ============ */
.banner {
  width: calc(100% - 40px);
  margin: 0 20px 12px;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.today-sec { padding: 0 20px 12px; }
.today-title {
  font-size: 15px; font-weight: 700; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.today-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.today-row::-webkit-scrollbar { display: none; }
.today-card {
  flex-shrink: 0; width: 130px;
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04); cursor: pointer;
  transition: transform .15s ease;
}
.today-card.pressed { transform: scale(.95); }
.today-card img { width: 130px; height: 96px; object-fit: cover; }
.today-card .tc-name {
  font-size: 13px; font-weight: 600; padding: 8px 10px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.today-card .tc-price { font-size: 13px; font-weight: 700; color: var(--primary); padding: 0 10px 10px; }

/* 海报预览(店主设置页) */
.banner-preview {
  width: 100%; aspect-ratio: 16/7; object-fit: cover;
  border-radius: 12px; margin-bottom: 10px;
}
.ai-image-preview {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 12px; margin: 8px 0;
}
.wide-btn { width: 100%; flex: none; }

/* ============ 菜品卡片网格 ============ */
.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 0 20px;
}
.card {
  position: relative; background: var(--card); border-radius: 22px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  cursor: pointer; transition: transform .12s;
}
.card:active { transform: scale(.97); }
.card-img {
  aspect-ratio: 1/1; background: linear-gradient(135deg, #FDE3EA, #FFF5F7);
  position: relative; overflow: hidden;
}
/* 图片加载骨架动画 */
.card-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: shimmer 1.2s infinite;
}
.card-img.has-img::after { display: none; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s ease;
  position: relative; z-index: 1;
}
.card-img img.loaded { opacity: 1; }
.card-noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #EFA8BC;
}
.card-body { padding: 10px 12px 12px; }
.card-name {
  font-size: 15px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px;
  font-size: 12px; color: var(--text-2);
}
.card-price { color: var(--primary); font-weight: 700; font-size: 16px; }
.card-star {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.92); font-size: 16px;
  filter: grayscale(1); opacity: .85;
}
.card-star.on { filter: none; opacity: 1; }

.diff-badge {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #F3EEEF; color: var(--text-2);
}
.diff-badge.simple { background: #E4F5EA; color: var(--green); }
.diff-badge.mid { background: #FFF0E4; color: var(--primary-dark); }
.diff-badge.hard { background: #FDE8E8; color: var(--danger); }

/* 空状态 */
.empty { text-align: center; padding: 60px 30px; color: var(--text-2); }
.empty-icon { font-size: 56px; margin-bottom: 12px; }
.empty p { font-size: 16px; font-weight: 600; color: var(--text); }
.empty .empty-sub { font-size: 14px; font-weight: 400; color: var(--text-2); margin-top: 6px; }

/* ============ 顾客端:菜品详情抽屉 ============ */
.dish-sheet { padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
.dish-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.dish-sheet h3 { padding: 18px 20px 0; text-align: left; font-size: 22px; }
.dish-price { padding: 4px 20px 0; color: var(--primary); font-weight: 700; font-size: 20px; }
.dish-desc { padding: 6px 20px 0; color: var(--text-2); font-size: 14px; }
#dish-options { padding: 14px 20px 0; }
.opt-group-c { margin-bottom: 14px; }
.opt-group-c .og-name { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); font-size: 14px; color: var(--text);
}
.opt-chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.opt-chip .add { color: var(--primary); font-weight: 600; font-size: 12px; }
.qty-row {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 16px 20px 14px;
}
.qty-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); font-size: 20px; color: var(--text);
}
#dish-qty { font-size: 20px; font-weight: 700; min-width: 28px; text-align: center; }
.btn.wide { display: block; width: calc(100% - 40px); margin: 0 20px; }

/* 顾客端详情里的食材/步骤 */
#dish-ing-box, #dish-steps-box, #dish-tips-box { padding: 8px 20px 0; }
.detail-sec { margin-bottom: 14px; }
.detail-sec h3 {
  font-size: 15px; margin-bottom: 8px; padding-left: 10px;
  border-left: 4px solid var(--primary); line-height: 1.2;
}
.ing-list li { list-style: none; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.ing-list li::before { content: "— "; color: var(--primary); font-weight: 700; }
.step-list li { list-style: none; display: flex; gap: 12px; margin-bottom: 12px; font-size: 15px; line-height: 1.6; }
.step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; margin-top: 2px;
}
.tips-box {
  background: #FFF6E0; border-radius: 12px; padding: 12px 14px;
  font-size: 14px; color: #8A6D1F; white-space: pre-wrap;
}

/* ============ 顾客端:购物车 ============ */
.cart-list { padding: 4px 20px; }
.cart-line {
  background: var(--card); border-radius: 14px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
  display: flex; align-items: center; gap: 12px;
}
.cart-line .cl-img {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, #FDE3EA, #FFF5F7);
}
.cart-line .cl-main { flex: 1; min-width: 0; }
.cart-line .cl-name { font-size: 15px; font-weight: 600; }
.cart-line .cl-opts { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.cart-line .cl-price { color: var(--primary); font-weight: 700; font-size: 15px; }
.cl-stepper { display: flex; align-items: center; gap: 8px; }
.cl-stepper button {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); font-size: 15px; line-height: 1;
}
.cl-del { border: none; background: none; color: var(--text-2); font-size: 16px; padding: 6px; }
.cart-footer {
  position: fixed; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--card); padding: 12px 20px;
  border-top: 1px solid var(--border);
  z-index: 40;
}
.cart-total { font-size: 15px; }
.cart-total b { color: var(--primary); font-size: 20px; }
.cart-footer .btn { flex: none; padding: 12px 32px; }

/* ============ 顾客端:结算 ============ */
.checkout-items { max-height: 40vh; overflow-y: auto; margin-bottom: 8px; }
.checkout-line {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.checkout-line .co-name { flex: 1; }
.checkout-line .co-sub { font-size: 12px; color: var(--text-2); }
.checkout-total { text-align: right; padding: 12px 0 4px; font-size: 15px; }
.checkout-total b { color: var(--primary); font-size: 22px; }

/* ============ 订单卡片(顾客+店主共用) ============ */
.order-card {
  background: var(--card); border-radius: 14px; padding: 14px;
  margin: 0 20px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.order-card .oc-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.order-card .oc-no { font-size: 13px; color: var(--text-2); }
.order-status {
  padding: 3px 12px; border-radius: 12px; font-size: 13px; font-weight: 600;
}
.st-pending { background: #FDF3E0; color: var(--amber); }
.st-accepted { background: #E8F1FB; color: var(--blue); }
.st-done { background: #E4F5EA; color: var(--green); }
.st-cancelled { background: #F0EDEB; color: #9A958C; }
.order-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 6px 0; font-size: 14px;
}
.order-item .oi-main { flex: 1; }
.order-item .oi-opts { font-size: 12px; color: var(--text-2); }
.order-item .oi-total { color: var(--primary); font-weight: 600; white-space: nowrap; }
.order-card .oc-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--text-2);
}
.order-card .oc-total b { color: var(--primary); font-size: 17px; }
.order-card .oc-actions { display: flex; gap: 10px; margin-top: 10px; }
.order-card .oc-actions .btn { flex: 1; padding: 10px; font-size: 15px; }
.oc-tag { display: inline-block; margin-left: 8px; font-size: 12px; }

/* 店主入口 */
.owner-entry-wrap { text-align: center; padding: 30px 0; }
.owner-entry {
  border: none; background: none; color: var(--text-2);
  font-size: 14px; padding: 10px 20px; text-decoration: underline;
}

/* ============ 店主端:订单看板 ============ */
.board-sec { padding: 6px 20px 4px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.board-sec b { color: var(--primary); }

/* ============ 表单 ============ */
.form { padding: 4px 20px 20px; }
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 14px; font-weight: 600; color: var(--text-2);
  margin-bottom: 8px;
}
.req { color: var(--danger); }
.field input[type="text"], .field input[type="password"], .field input[type="tel"],
.field select, .field textarea, .cat-add-row input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); outline: none;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; }
.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239C8F94' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus, .field select:focus, .field textarea:focus,
.cat-add-row input:focus { border-color: var(--primary); }
.field-row { display: flex; gap: 12px; }
.field.half { flex: 1; }

/* 图片选择 */
#image-picker { text-align: center; }
#image-placeholder {
  border: 2px dashed var(--border); border-radius: 22px;
  padding: 34px 16px; color: var(--text-2); background: var(--card);
  cursor: pointer;
}
#image-preview {
  width: 100%; max-height: 260px; object-fit: cover;
  border-radius: 22px;
}
.chip-btn {
  margin-top: 10px; padding: 7px 18px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--card); color: var(--danger); font-size: 14px;
}

/* 动态列表(食材/步骤) */
.dyn-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dyn-index {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.dyn-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); outline: none; font-size: 16px; }
.dyn-row input:focus { border-color: var(--primary); }
.dyn-del {
  flex-shrink: 0; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #F6EFF1; color: var(--text-2); font-size: 13px;
}
.add-row-btn {
  width: 100%; padding: 11px; border: 1px dashed var(--border); border-radius: 12px;
  background: none; color: var(--primary); font-size: 15px; font-weight: 600;
}

/* 规格编辑(店主表单) */
.opt-group {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 12px;
}
.opt-group-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.opt-name { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; }
.opt-type { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: var(--card); }
.opt-del { border: none; background: none; color: var(--text-2); font-size: 16px; padding: 6px; }
.opt-choice { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.oc-label { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; }
.oc-price { width: 70px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; }
.oc-del { border: none; background: none; color: var(--text-2); font-size: 13px; padding: 6px; }
.opt-add-choice {
  border: 1px dashed var(--border); border-radius: 8px; background: none;
  color: var(--primary); font-size: 13px; padding: 6px 12px; width: 100%;
}
.opt-quick { margin-top: 0; }
.opt-quick .btn { font-size: 14px; padding: 10px; }

.switch-row { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text) !important; }
.switch-row input { width: 22px; height: 22px; accent-color: var(--primary); }
.switch-row.small { font-size: 14px; color: var(--text-2); }

/* ============ 店主端:详情页 ============ */
.detail-img { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, #FDE3EA, #FFF5F7); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-img .card-noimg { font-size: 64px; }
.detail-body { padding: 20px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-head h2 { font-size: 22px; line-height: 1.35; flex: 1; }
.detail-head .card-star { position: static; flex-shrink: 0; width: 40px; height: 40px; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 22px; }
.detail-price { color: var(--primary); font-weight: 700; font-size: 18px; }
.detail-back {
  border: none; background: none; font-size: 22px; padding: 4px 8px 4px 0;
  color: var(--text);
}

/* ============ 我的页(店主) ============ */
.my-card { padding: 0 20px; }
.stat {
  background: linear-gradient(135deg, var(--primary), #F2788F);
  color: #fff; border-radius: 22px;
  padding: 18px 20px; margin-bottom: 16px; font-size: 15px;
  
}
.stat b { font-size: 22px; }
.my-section {
  background: var(--card); border-radius: 22px;
  padding: 16px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.my-section h3 { font-size: 16px; margin-bottom: 8px; }
.hint { font-size: 13px; color: var(--text-2); margin-bottom: 12px; line-height: 1.6; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.cat-add-row { display: flex; gap: 10px; margin-bottom: 10px; }
.cat-add-row input { flex: 1; padding: 10px 12px; font-size: 15px; }
.cat-add-row button { flex-shrink: 0; }
.captcha-img { width: 112px; height: 40px; border-radius: 10px; border: 1px solid var(--border, #eee); cursor: pointer; flex-shrink: 0; background: #fdf3f6; }
.plaza-banner { display: flex; align-items: center; gap: 8px; background: #fff7e6; border: 1px solid #ffd591; color: #ad6800; border-radius: 12px; padding: 10px 14px; margin: 0 20px 14px; font-size: 13px; line-height: 1.5; }
.plaza-banner button { margin-left: auto; flex-shrink: 0; }
#custom-categories { padding: 0; }
#custom-categories .chip { position: relative; padding-right: 30px; }
#custom-categories .chip .chip-x {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--text-2); font-size: 13px; padding: 2px;
}
.about { text-align: center; font-size: 12px; color: var(--text-2); padding: 10px 0 4px; }

/* ============ 添加菜品悬浮按钮 ============ */
#view-home { padding-bottom: 90px; }
.fab {
  position: fixed;
  right: max(20px, calc(50vw - 220px));
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px);
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #F2788F);
  color: #fff; font-size: 30px; line-height: 1;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 45;
}
.fab:active { transform: scale(.92); }

/* ============ 按钮 ============ */
.btn {
  flex: 1; padding: 13px 16px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.secondary { background: #F6EFF1; color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn-row { display: flex; gap: 12px; margin-top: 16px; }

/* ============ 底部导航 ============ */
.tab-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}
.tab {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; border: none; background: none;
  font-size: 11px; color: var(--text-2);
}
.tab.active { color: var(--primary); font-weight: 600; }
.tab-icon { font-size: 22px; line-height: 1; }
.badge {
  position: absolute; top: 4px; left: 50%; margin-left: 12px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ============ 弹窗(底部抽屉) ============ */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--card); border-radius: 26px 26px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp .25s ease;
  max-height: 88vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet h3 { font-size: 18px; margin-bottom: 10px; text-align: center; }
.sheet textarea {
  width: 100%; margin-top: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 13px; background: #FCF8F9; outline: none;
  resize: vertical; word-break: break-all;
}

/* 随机推荐 */
.random-card { text-align: center; padding: 12px 0 4px; cursor: pointer; }
.random-card img {
  width: 180px; height: 180px; object-fit: cover;
  border-radius: 18px; margin: 0 auto 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.random-noimg {
  width: 120px; height: 120px; border-radius: 18px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #FDE3EA, #FFF5F7);
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}
.random-card h4 { font-size: 20px; margin-bottom: 10px; }
.random-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.random-empty { text-align: center; color: var(--text-2); padding: 30px 0; }

/* ============ 开屏动画(全屏适配) ============ */
.splash {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--primary-soft, #FDEBF0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: opacity .5s ease;
}
.splash-hide { opacity: 0; pointer-events: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-bowl {
  width: 84px; height: 84px;
  color: var(--primary, #F28BA6);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.06));
  animation: splashIn .6s ease;
}
.splash-text {
  color: var(--text, #6B5560); font-size: 20px; font-weight: 600; letter-spacing: 3px;
  animation: splashIn .6s ease;
}
.splash-dots i {
  font-style: normal; margin-left: 2px;
  animation: splashBlink 1.4s infinite;
}
.splash-dots i:nth-child(2) { animation-delay: .2s; }
.splash-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes splashIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splashBlink { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }

/* ============ 提示 Toast ============ */
.toast {
  position: fixed; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px);
  left: 50%; transform: translateX(-50%);
  background: rgba(51,39,43,.92); color: #fff;
  padding: 10px 22px; border-radius: 22px; font-size: 14px;
  z-index: 200; max-width: 85%; text-align: center;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.couple-card { text-align: center; padding: 30px 16px; background: var(--card); border-radius: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.couple-days { font-size: 52px; font-weight: 800; color: var(--primary); margin: 6px 0; }
/* 每日一言 */
.daily-saying { background: var(--primary-soft); border-radius: 22px; padding: 18px 16px; margin: 4px 0 14px; text-align: center; }
.daily-saying .ds-title { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.daily-saying .ds-text { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.7; }

/* 子页返回键(圆润无尖角) */
.btn-sub-back {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 18px; line-height: 1; flex-shrink: 0;
}
.btn-sub-back:active { transform: scale(.92); }

/* 一周菜单选菜键 */
.wm-pick {
  width: 32px; height: 32px; flex-shrink: 0; border: none; border-radius: 50%;
  background: var(--primary-soft); font-size: 15px;
}

/* 马卡龙可爱风:更大圆角 + 轻阴影 */
.my-section, .card, .plaza-card, .order-card, .stat-tile, .couple-card { border-radius: 22px; }
.my-section, .card, .plaza-card, .order-card { box-shadow: 0 2px 6px rgba(0,0,0,.03); }
.btn { border-radius: 999px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.quick-card {
  background: var(--card); border-radius: 18px; padding: 18px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  transition: transform .15s ease;
}
.quick-card.pressed { transform: scale(.95); }
.qc-emoji { font-size: 30px; }

/* ============ 可爱风:身份卡/冰箱/周菜单/广场 ============ */
.identity-row { display: flex; gap: 12px; margin-bottom: 10px; }
.identity-card {
  flex: 1; background: var(--card); border: 2px solid var(--border);
  border-radius: 20px; padding: 18px 12px; text-align: center;
  cursor: pointer; transition: transform .15s ease, border-color .2s ease;
}
.identity-card.active { border-color: var(--primary); background: var(--primary-soft); }
.identity-card.pressed { transform: scale(.95); }
.ic-emoji { font-size: 40px; margin-bottom: 6px; }
.ic-name { font-size: 17px; font-weight: 800; }
.ic-desc { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.fridge-item, .shop-item-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 4px; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.shop-item-row .si-done { text-decoration: line-through; color: var(--text-2); }
.ai-result-box {
  margin-top: 12px; background: var(--primary-soft); border-radius: 14px;
  padding: 14px; font-size: 14px; line-height: 1.7; white-space: pre-wrap;
}
.weekmenu-grid { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.wm-row { display: flex; align-items: center; gap: 5px; width: 100%; }
.wm-row > div { flex: 1; min-width: 0; }
.wm-day { width: 40px; font-size: 12px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.wm-input {
  width: 100%; padding: 7px 6px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; background: var(--card); outline: none; min-width: 0;
  box-sizing: border-box;
}
.wm-input:focus { border-color: var(--primary); }
.wm-label { font-size: 11px; color: var(--text-2); text-align: center; }
.plaza-card {
  background: var(--card); border-radius: 18px; margin: 0 20px 12px; padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.plaza-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.plaza-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0;
}
.plaza-name { font-size: 14px; font-weight: 700; }
.plaza-time { font-size: 11px; color: var(--text-2); }
.plaza-type {
  margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
}
.plaza-text { font-size: 15px; line-height: 1.6; margin-bottom: 8px; }
.plaza-img { width: 100%; border-radius: 12px; margin-bottom: 8px; }
.plaza-actions { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.plaza-actions button { border: none; background: none; color: var(--text-2); font-size: 13px; padding: 4px; }
.tutorial-box { font-size: 13px; line-height: 1.9; color: var(--text); }
.tutorial-box p { margin-bottom: 6px; }
.comment-item { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.comment-item .cm-name { font-weight: 700; font-size: 13px; }
.comment-item .cm-text { font-size: 14px; }
.comment-item .cm-del { margin-left: auto; border: none; background: none; color: var(--danger); font-size: 13px; }

/* ============ 登录墙 ============ */
.login-view {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--primary, #F79DB3), #F7C4D4);
  padding: 24px;
}
.login-box {
  width: 100%; max-width: 340px;
  background: var(--card); border-radius: 24px;
  padding: 32px 24px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  animation: splashIn .5s ease;
}
.login-logo { font-size: 48px; text-align: center; margin-bottom: 6px; }
.login-box h1 { text-align: center; font-size: 24px; margin-bottom: 2px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-2); margin-bottom: 18px; }
.role-row { display: flex; gap: 10px; margin-bottom: 12px; }
.role-btn {
  flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); font-size: 14px; color: var(--text-2);
}
.role-btn.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ============ 店铺切换器 ============ */
.shop-switch { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.shop-switch span:first-child { font-size: 20px; font-weight: 700; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switch-arrow { font-size: 13px; color: var(--text-2); }
.shop-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px; border-bottom: 1px dashed var(--border); cursor: pointer;
}
.shop-item .si-name { font-weight: 600; }
.shop-item .si-meta { font-size: 12px; color: var(--text-2); }
.shop-item.current { color: var(--primary); }
.shop-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 9px; margin-left: 6px;
}
.shop-tag.owner { background: var(--primary-soft); color: var(--primary); }
.shop-tag.pending { background: #FDF3E0; color: var(--amber); }
.shop-tag.admin { background: #EFE7FB; color: #8A5FD0; }
.shop-tag.user { background: #EFF3F7; color: #7A8BA3; }
.search-shop-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; border-bottom: 1px dashed var(--border);
}
.search-shop-item button { flex: none; padding: 8px 16px; font-size: 14px; }

/* ============ 店铺管理 ============ */
.invite-code-box {
  text-align: center; padding: 12px; margin-bottom: 10px;
  background: var(--primary-soft); border-radius: 12px;
}
.invite-code-box .ic-num { font-size: 30px; font-weight: 800; letter-spacing: 6px; color: var(--primary); }
.member-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.member-row .mr-name { font-weight: 600; }
.member-row button { flex: none; padding: 7px 14px; font-size: 13px; }

/* ============ 管理员数据看板(单色序贯柱状图规范) ============ */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-tile {
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.stat-tile .st-num { font-size: 24px; font-weight: 800; color: var(--primary); }
.stat-tile .st-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.chart-box { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: 22px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.chart-bar {
  width: 70%; min-height: 3px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  opacity: .55;
  transition: height .3s ease;
}
.chart-bar.today { opacity: 1; }
.chart-val { font-size: 11px; font-weight: 700; color: var(--text); }
.chart-date { font-size: 10px; color: var(--text-2); }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.rank-num { width: 20px; text-align: center; font-weight: 800; color: var(--text-2); }
.rank-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar-wrap { width: 34%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.rank-bar { height: 100%; background: var(--primary); border-radius: 4px; opacity: .8; }
.rank-count { width: 56px; text-align: right; color: var(--text); font-weight: 700; }

/* ============ 收款码与图库 ============ */
.paycode-row { display: flex; gap: 12px; margin-top: 10px; }
.paycode-box { flex: 1; text-align: center; }
.paycode-box img {
  width: 100%; aspect-ratio: 1/1.15; object-fit: contain;
  border-radius: 10px; background: #fff; margin-bottom: 4px;
}
.paycode-box .si-meta { font-size: 12px; }
.pay-amount { text-align: center; font-size: 34px; font-weight: 800; color: var(--primary); margin: 8px 0; }
.pay-order-no { text-align: center; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.pay-code-img {
  display: block; max-width: 220px; margin: 0 auto 12px;
  border-radius: 12px;
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery-item .gi-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 10px; padding: 3px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-item.picked { outline: 3px solid var(--primary); }
.pay-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 9px; margin-left: 6px;
}
.pay-tag.unpaid { background: #FDF3E0; color: var(--amber); }

/* ============ 首页时间天气卡片(可爱风,紧凑两行,与上下模块左右对齐) ============ */
.tw-card {
  margin: 4px 0 14px; padding: 10px 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, #ffe9f0 0%, #fff6f8 60%, #ffeef3 100%);
  border: 1.5px solid #ffd9e2; box-shadow: 0 2px 8px rgba(255, 126, 157, .12);
}
.tw-row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tw-clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: #e0567d; letter-spacing: .5px; }
.tw-date { font-size: 12px; color: #8a6d78; }
.tw-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.tw-weather { font-size: 13px; color: #5b4a54; white-space: normal; line-height: 1.7; }
.tw-weather .hd-ico svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.tw-daily { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-day { font-size: 12px; color: #8a6d78; background: rgba(255,255,255,.75); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* ============ 管理端设置:密码策略复选行 ============ */
.check-row { display: flex; align-items: center; gap: 8px; padding: 8px 2px; font-size: 14px; color: var(--text); }
.check-row input { width: 18px; height: 18px; accent-color: var(--primary); }

/* ============ 冰箱:A4 图文教程 ============ */
.tut-step-row { padding: 5px 0; font-size: 14px; color: var(--text); border-bottom: 1px dashed #f0dfe4; }
.tut-page-box { margin-bottom: 14px; }
.tut-page-box img { width: 100%; border-radius: 12px; border: 1px solid #f0dfe4; display: block; background: #fff; }
.tut-page-box .btn-row { margin-top: 8px; }

/* ============ 管理端图库:云图库操作按钮 ============ */
.gi-actions { display: flex; gap: 6px; padding: 4px 6px 8px; }
.gi-actions .btn { flex: 1; }

/* =====================================================
   马卡龙简约 UI:浅粉渐变背景 / 白色大圆角卡片 / 柔和阴影
   (手绘图标保留,容器改干净大圆角)
   ===================================================== */
body {
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 34%, var(--bg) 100%);
  background-attachment: fixed;
}
/* 白色圆角大卡片(统一 22-24px 大圆角 + 柔和阴影 + 干净留白) */
.card, .plaza-card, .order-card, .stat-tile, .couple-card, .my-section, .daily-saying, .tw-card, .inspire-card, .login-box {
  border-radius: 24px;
}
.my-section {
  box-shadow: 0 4px 14px rgba(216, 120, 150, .07);
  border: 1px solid var(--border);
}
/* 嵌套分组不重复套卡片 */
.my-section .my-section {
  background: transparent; border: none; box-shadow: none;
  border-radius: 0; padding: 0; margin: 0;
}
.card { box-shadow: 0 6px 18px rgba(233, 120, 150, .10); }
.stat-tile { box-shadow: 0 4px 12px rgba(216, 120, 150, .08); border: 1px solid var(--border); }
.daily-saying, .tw-card, .inspire-card { box-shadow: 0 4px 12px rgba(216, 120, 150, .08); }
/* 圆角按钮(药丸形)+ 粉色主按钮渐变 */
.btn { border-radius: 999px; line-height: 1.2; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 4px 12px rgba(233, 90, 130, .25); }
.tab-bar { border-top: 1px solid var(--border); background: var(--card); }
.chip { border-radius: 999px; background: var(--card); border: 1px solid var(--border); }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.member-row, .fridge-item, .shop-item-row { border-radius: 16px; }
.sheet { border-radius: 24px; box-shadow: 0 12px 44px rgba(120, 60, 90, .16); }
input, textarea, select { border-radius: 12px; }
/* 管理端顶部标签栏不换行,可横向滑动,避免挤压变形 */
#admin-cats { flex-wrap: nowrap; overflow-x: auto; }
#admin-cats .chip { flex-shrink: 0; }
/* 手绘自动替换图标(.hd-ico)在各场景的尺寸与间距 */
.hd-ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hd-ico svg { width: 1.15em; height: 1.15em; }
.app-header h1 .hd-ico svg, .sub-header h2 .hd-ico svg { width: 1.25em; height: 1.25em; vertical-align: -0.18em; }
.chip .hd-ico svg, .btn .hd-ico svg { width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 4px; }
.tab-icon .hd-ico svg { width: 26px; height: 26px; }
.empty-icon .hd-ico svg, .card-noimg .hd-ico svg { width: 46px; height: 46px; }
.login-logo .hd-ico svg { width: 56px; height: 56px; }
.ds-title .hd-ico svg, .board-sec .hd-ico svg, .kitchen-zone-head .hd-ico svg, .inspire-head .hd-ico svg, h3 .hd-ico svg { vertical-align: -0.16em; }
/* 按钮/徽章内文字与图标间距更自然 */
.btn { gap: 5px; }
.chip { gap: 4px; }
h1, h2, h3 { letter-spacing: .02em; }
/* 手绘图标容器 */
.tab-icon svg, .qc-emoji svg, .ic-emoji svg {
  width: 26px; height: 26px; display: block; color: var(--primary);
}
.ic-emoji { display: flex; justify-content: center; }
.ic-emoji svg { width: 40px; height: 40px; }
.qc-emoji svg { width: 30px; height: 30px; margin: 0 auto 6px; }
.tab-icon { display: flex; justify-content: center; margin-bottom: 2px; }
/* 界面切换过渡动画(0.25s 轻淡入上滑) */
.view:not(.hidden) { animation: view-in .25s ease; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
/* 弹窗动画:丝滑入场。注意 .sheet 基础 transform 是 translateX(-50%) 居中,
   关键帧必须保留它,否则动画期间会横向跳动(卡顿观感来源) */
.modal:not(.hidden) .modal-mask { animation: fade-in .18s ease; }
.modal:not(.hidden) .sheet { animation: sheet-in .24s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: .55; transform: translate(-50%, 26px); } to { opacity: 1; transform: translate(-50%, 0); } }
.modal .sheet { will-change: transform, opacity; }
/* AI 生图失败日志弹窗 */
.ai-err-log {
  white-space: pre-wrap; word-break: break-all; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 12px; padding: 12px;
  font-size: 12px; color: var(--text); line-height: 1.6;
  max-height: 40vh; overflow: auto; margin: 8px 0;
}

/* ============ 厨房模块(分模块布局) ============ */
.kitchen-summary { display: flex; gap: 10px; margin: 4px 0 14px; }
.ks-cell {
  flex: 1; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 10px 6px; text-align: center;
}
.ks-num { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ks-num.ks-warn { color: #D99A2B; }
.ks-num.ks-bad { color: #D64545; }
.ks-label { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.kt-module {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 12px 14px; margin-bottom: 12px;
}
.kt-clickable { cursor: pointer; }
.kt-clickable:active { transform: scale(.985); }
.kt-module-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; color: var(--text); }
.kt-zone-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.kt-zone-cell {
  display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  background: var(--bg); border: 1.5px dashed var(--border);
  border-radius: 16px; padding: 10px 4px;
}
.kt-zone-cell:active { transform: scale(.95); }
.kt-zone-ico { font-size: 20px; line-height: 1; }
.kt-zone-ico .hd-ico svg { width: 24px; height: 24px; }
.kt-zone-name { font-size: 13px; font-weight: 600; color: var(--text); }
.kt-zone-num { font-size: 12px; color: var(--text-2); }
.kt-badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; margin-left: 6px; }
.kt-badge.k-soon { background: #FBE9C9; color: #B97E14; }
.kt-badge.k-exp { background: #FADDDD; color: #C43B3B; }
.kt-back-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kt-view-title { font-size: 15px; font-weight: 700; color: var(--text); }

/* ============ 实时位置地图 ============ */
#map-container {
  height: calc(100vh - 170px); min-height: 320px; margin: 0 0 10px;
  border-radius: 16px; overflow: hidden; border: 1.5px solid var(--border);
}
#map-fallback { margin: 0 20px; }
.map-info-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 20px 14px; padding: 9px 12px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 18px;
  font-size: 13px; color: var(--text); flex-wrap: wrap;
}
.loc-rel-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 12px; margin-top: 10px; }
.loc-rel-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; color: var(--text); }
.loc-ava {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 1.5px solid var(--border); color: var(--text);
}
.loc-rel-line { text-align: center; padding: 4px 0; color: var(--text-2); font-size: 13px; }

/* =====================================================
   日系动漫风精修:登录页满屏无滚动 + 厨房柔和手绘质感
   ===================================================== */
/* 背景:浅色细腻纹理 + 浅粉渐变(纹理极轻,不过度复杂) */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.025 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 34%, var(--bg) 100%);
  background-attachment: fixed;
}
/* 登录页:恰好一屏,无滚动条,版权紧贴底部 */
.login-view {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, #FDEBF0 0%, #FFF6F8 52%, #FDF0F5 100%);
  padding: 12px;
  overflow: hidden;
}
.login-box {
  width: 100%; max-width: 360px;
  max-height: calc(100dvh - 24px);
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 28px;
  padding: 18px 22px 8px;
  box-shadow: 0 10px 34px rgba(214, 110, 140, .13);
  animation: splashIn .5s ease;
  overflow-y: auto; scrollbar-width: none;
}
.login-box::-webkit-scrollbar { display: none; }
.login-logo { font-size: 44px; text-align: center; margin-bottom: 2px; line-height: 1; }
.login-logo svg { width: 46px; height: 46px; }
.login-box h1 { text-align: center; font-size: 23px; margin-bottom: 0; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-2); margin: 5px 0 12px; }
.login-box .cat-add-row { margin-bottom: 8px; }
.login-box .cat-add-row input { padding: 10px 12px; font-size: 15px; }
.login-box .btn { padding: 12px 16px; font-size: 16px; }
.login-box .hint { margin-bottom: 6px; }
/* 版权信息吸底(用第一个 about 的 auto 上边距吃掉剩余空间) */
.login-box > .about:first-of-type { margin-top: auto; padding-top: 10px; }
/* 厨房:日系动漫风,分区小卡片柔和马卡龙配色 + 轻微手绘描边 */
.kt-module {
  border-radius: 22px 16px 21px 17px / 16px 21px 17px 22px;
  border: 1.5px solid var(--border);
  box-shadow: 0 3px 10px rgba(210, 120, 150, .05);
}
.ks-cell {
  border-radius: 16px 12px 15px 13px / 12px 15px 13px 16px;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(210, 120, 150, .05);
}
.kt-zone-grid { gap: 10px; }
.kt-zone-cell {
  border-radius: 16px 12px 15px 13px / 12px 15px 13px 16px;
  border: 1.5px solid var(--border);
  padding: 12px 4px 10px;
  box-shadow: 0 2px 8px rgba(210, 120, 150, .05);
  gap: 2px;
}
.kt-zone-ico { font-size: 21px; line-height: 1.1; display: flex; justify-content: center; }
.kt-zone-ico .hd-ico svg { width: 23px; height: 23px; }
.kt-zone-name { font-size: 13px; font-weight: 600; color: var(--text); text-align: center; }
.kt-zone-num { font-size: 11px; color: var(--text-2); text-align: center; }
/* 模块头部统一:图标+标题左,状态右,不重复文字 */
.kt-module-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; color: var(--text); }
.kt-module-head .hd-ico svg { width: 18px; height: 18px; vertical-align: -0.14em; margin-right: 3px; }
.kt-module-head .si-meta { font-size: 12px; font-weight: 400; }
/* 各分区低饱和马卡龙底色(顺序:冷藏/冷冻/果蔬/门架/橱柜/调味架) */
.kt-zone-cell:nth-child(1) { background: #F0F6FB; }
.kt-zone-cell:nth-child(2) { background: #F1F0FA; }
.kt-zone-cell:nth-child(3) { background: #F0F8EF; }
.kt-zone-cell:nth-child(4) { background: #FDF6EC; }
.kt-zone-cell:nth-child(5) { background: #FDF2EE; }
.kt-zone-cell:nth-child(6) { background: #FDEEF3; }
/* 按钮更圆润、阴影更柔和 */
.btn { border-radius: 999px; }
.btn.primary { box-shadow: 0 4px 10px rgba(233, 90, 130, .18); }
.btn.secondary { background: var(--primary-soft); color: var(--primary-dark); box-shadow: none; }
.inspire-card {
  margin: 4px 0 14px; padding: 14px 16px; text-align: center;
  background: linear-gradient(135deg, #FFF1D6 0%, #FFF7E8 60%, #FFF1D6 100%);
  border: 1.5px solid #F0DFC0;
}
.inspire-head { font-size: 12px; color: #B08A5E; margin-bottom: 6px; }
.inspire-dish { font-size: 17px; font-weight: 800; color: #7A5C38; }
.inspire-text { font-size: 13px; color: #8A6D45; margin-top: 5px; line-height: 1.6; }
.inspire-actions { justify-content: center; margin-top: 10px; }
.kitchen-suggest {
  position: absolute; left: 0; right: 0; top: 46px; z-index: 30;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.1); overflow: hidden;
}
.kitchen-suggest-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer;
  border-bottom: 1px dashed var(--border); font-size: 14px; color: var(--text);
}
.kitchen-suggest-item:last-child { border-bottom: none; }
.kitchen-suggest-item img { width: 34px; height: 34px; }
.kitchen-zone { margin: 14px 0; }
.kitchen-zone-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 700; color: var(--text); padding: 0 2px 6px;
}
.kitchen-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px; margin-bottom: 8px;
}
.kitchen-sticker { width: 44px; height: 44px; flex-shrink: 0; }
.kitchen-item-main { flex: 1; min-width: 0; }
.kitchen-item-name { font-size: 15px; font-weight: 600; color: var(--text); }
.kitchen-item-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.k-exp { color: #D64545; }
.k-soon { color: #D99A2B; }
.kitchen-item-actions { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }
.kitchen-item-actions .btn { padding: 6px 10px; font-size: 12px; }
.kitchen-item-edit { width: 100%; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }

.pay-tag.marked { background: #FDE8E8; color: var(--danger); }
.pay-tag.confirmed { background: #E4F5EA; color: var(--green); }
.order-card.pay-marked { border: 2px solid var(--danger); }

/* ============ 平台公告 ============ */
.announcement-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 20px 10px; padding: 10px 14px;
  background: var(--primary-soft); border-radius: 12px;
  font-size: 13px; color: var(--text); line-height: 1.5;
}
.announcement-bar span { flex: 1; }
.ann-dismiss {
  border: none; background: none; color: var(--text-2);
  font-size: 14px; padding: 4px; flex-shrink: 0;
}

/* ============ 修复:页面始终可滚动,防止 Safari 工具栏伸缩导致 tab 栏跳动 ============ */
.view { min-height: 88vh; }

/* ============ 我的页:主题/布局选择 ============ */
.theme-row { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--card); font-size: 14px; color: var(--text);
  cursor: pointer;
}
.theme-item.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.theme-item svg { width: 18px; height: 18px; vertical-align: middle; }
.theme-dot {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
#account-panel .btn-row { margin-top: 4px; }

/* ============ 菜单布局:单列列表 ============ */
body.layout-list #c-dish-grid { grid-template-columns: 1fr; }
body.layout-list #c-dish-grid .card { display: flex; min-height: 108px; }
body.layout-list #c-dish-grid .card-img { width: 38%; aspect-ratio: 1/1; flex-shrink: 0; }
body.layout-list #c-dish-grid .card-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 12px 14px;
}
body.layout-list #c-dish-grid .card-name { min-height: auto; -webkit-line-clamp: 2; }

/* ============ 桌面浏览器查看时居中 ============ */
@media (min-width: 481px) {
  body { background: #F1EBEC; }
  #app { box-shadow: 0 0 30px rgba(0,0,0,.08); background: var(--bg); }
}

/* ============ 扫码点餐 ============ */
.scan-head { padding: 14px 16px 6px; }
.scan-head h3 { margin: 0 0 4px; cursor: pointer; }
.scan-announcement { font-size: 13px; color: var(--text-2); white-space: pre-line; }
.scan-banner { width: 100%; border-radius: 12px; margin-top: 8px; }
.scan-error { margin: 24px 16px; text-align: center; color: var(--text-2); }
.scan-error .btn { margin-top: 12px; }
#view-scan { padding-bottom: 96px; }        /* 给悬浮购物车条留位 */
#view-scan-status { padding-bottom: 32px; }
.scan-cart-bar {
  position: fixed; left: 12px; right: 12px; max-width: 456px; margin: 0 auto;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  padding: 10px 14px; box-shadow: 0 4px 18px rgba(0,0,0,.12); z-index: 40;
}
.scan-cart-bar span { font-size: 14px; color: var(--text-2); }
.scan-qr-box { text-align: center; margin: 12px 0; }
.scan-qr-box img { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px; }
.scan-badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 8px; background: var(--primary); color: #fff; margin-right: 6px; vertical-align: 1px; }
/* 订单进度时间线 */
.ss-head { font-size: 16px; font-weight: 700; padding: 16px 16px 4px; }
.ss-order-no { color: var(--text-2); font-size: 13px; font-weight: 400; margin-left: 6px; }
.ss-timeline { display: flex; justify-content: space-around; padding: 8px 24px 20px; position: relative; }
.ss-timeline::before { content: ''; position: absolute; top: 11px; left: 15%; right: 15%; height: 2px; background: var(--border); }
.ss-step { position: relative; z-index: 1; text-align: center; font-size: 13px; color: var(--text-2); padding-top: 34px; min-width: 64px; }
.ss-step::before { content: ''; position: absolute; top: 0; left: 50%; margin-left: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--border); }
.ss-step.active { color: var(--primary); font-weight: 600; }
.ss-step.active::before { background: var(--primary); }
.ss-meta { padding: 0 16px 12px; font-size: 13px; color: var(--text-2); line-height: 1.8; }
#ss-actions { padding: 0 16px 16px; justify-content: center; }
#btn-scan-back { display: block; margin: 0 auto 16px; }
