/* ============================================================
   两人食堂 · 胡闹厨房官方工艺风（X 方案定稿）
   ============================================================ */

@font-face {
  font-family: "Lilita One";
  src: url("../vendor/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "ZCOOL KuaiLe";
  src: url("../vendor/fonts/ZCOOLKuaiLe-Regular.ttf") format("truetype");
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #4a2c17;          /* 深棕描边 */
  --ink2: #33221a;
  --red: #e8452f;
  --red-d: #b93521;
  --red-dd: #7c1c0f;
  --yellow: #ffd23e;
  --green: #4cae2d;
  --green-d: #245017;
  --wood: #96602e;
  --wood-d: #5f3c1c;
  --wood-dd: #4a2e14;
  --cream: #fffdf6;
  --paper: #f7eeda;
  --tan: #a97c4b;
}

html { font-size: 16px; }
body {
  font-family: "Lilita One", "ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  padding-bottom: 96px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(rgba(0, 0, 0, .05) 1px, transparent 1.4px),
    repeating-conic-gradient(#f8ead8 0% 25%, #f2decb 0% 50%);
  background-size: 18px 18px, 56px 56px;
}
/* 暗角，游戏镜头感 */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30;
  background: radial-gradient(120% 90% at 50% 30%, transparent 60%, rgba(74, 44, 23, .15));
}

.hidden { display: none !important; }
.pre { white-space: pre-wrap; line-height: 1.9; }

/* ============ 通用按压手感：所有按钮按下去会"陷下去" ============ */
button { font-family: inherit; color: inherit; cursor: pointer; }
.btn, .chip, .tab, .char-card, .start-btn, .play-btn, .qty-btn, .icon-chip, .role-chip {
  transition: transform .08s, box-shadow .08s, filter .15s;
}

/* ============ 遮阳棚 ============ */
.awning {
  position: sticky; top: 0; z-index: 22; height: 34px;
  background: repeating-linear-gradient(90deg, var(--red) 0 44px, #fdf6ea 44px 88px);
  border-bottom: 4px solid var(--red-d);
}
.awning::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 45%, rgba(0,0,0,.08));
}
.awning::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -16px; height: 12px;
  background:
    radial-gradient(circle at 22px -3px, var(--red) 13px, transparent 14px) 0 0/88px 14px,
    radial-gradient(circle at 66px -3px, #fdf6ea 13px, transparent 14px) 0 0/88px 14px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .15));
}

/* ============ 顶栏 ============ */
.app-header {
  position: sticky; top: 34px; z-index: 21;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 14px 8px;
  max-width: 640px; margin: 0 auto;
}
.brand-mini {
  position: relative;
  background: linear-gradient(180deg, #ab7038 0%, var(--wood) 55%, #7f4e24 100%);
  border: 4px solid var(--wood-d); border-radius: 13px;
  padding: 7px 16px 6px; font-size: 17px; letter-spacing: 2px; color: #ffe9b3;
  text-shadow: 0 2px 0 var(--wood-d);
  box-shadow: 0 5px 0 var(--wood-dd), 0 8px 12px rgba(0,0,0,.2), inset 0 3px 0 rgba(255,255,255,.25);
  transform: rotate(-1deg);
}
.screw {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8a6a45, var(--wood-dd));
}
.screw.tl { top: 5px; left: 5px; } .screw.tr { top: 5px; right: 5px; }
.screw.bl { bottom: 5px; left: 5px; } .screw.br { bottom: 5px; right: 5px; }
.header-right { display: flex; align-items: center; gap: 7px; }
.mode-badge {
  font-size: .68rem; color: #a05a00; background: #fff3d6;
  border: 2px solid #e8b84a; border-radius: 999px; padding: 3px 9px;
}
.icon-chip, .role-chip {
  font-size: .8rem; background: linear-gradient(180deg, #fff, #f1e6d2);
  border: 3px solid var(--ink); border-radius: 999px; padding: 6px 11px;
  box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 #fff;
}
.icon-chip:active, .role-chip:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.icon-chip.muted { filter: grayscale(1); opacity: .65; }

/* ============ 页面通用 ============ */
main { padding: 10px 14px 0; max-width: 640px; margin: 0 auto; position: relative; z-index: 5; }
.page-title { font-size: 1.25rem; letter-spacing: 1px; margin-bottom: 12px; text-shadow: 0 1px 0 #fff; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.page-title-row .page-title { margin-bottom: 0; }
.title-actions { display: flex; gap: 8px; }

.empty { text-align: center; padding: 48px 0 40px; color: var(--tan); }
.empty-emoji { font-size: 2.8rem; margin-bottom: 10px; }
.empty p { font-size: 1.05rem; }
.empty-sub { font-size: .8rem; margin-top: 6px; opacity: .8; }

/* ============ 菜单页 hero ============ */
.hero { position: relative; padding: 4px 0 2px; }
.sunburst {
  position: absolute; left: 50%; top: -120px; width: 430px; height: 430px;
  transform: translateX(-50%); pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 214, 120, .38) 0deg 8deg, transparent 8deg 16deg);
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 62%);
  mask: radial-gradient(circle, #000 20%, transparent 62%);
}
.sunburst.spin { animation: spin 70s linear infinite; }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
.hero-row { position: relative; display: flex; justify-content: center; align-items: center; gap: 4px; }
.hero-chef { filter: drop-shadow(0 4px 3px rgba(0,0,0,.22)); }

/* 缎带 */
.ribbon-wrap { position: relative; display: flex; justify-content: center; z-index: 2; }
.ribbon {
  position: relative; background: linear-gradient(180deg, #f5564a, #d63a24);
  color: #fff; font-size: .85rem; letter-spacing: 3px; padding: 9px 22px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
  box-shadow: 0 3px 0 #9c2413, 0 6px 10px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.3);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 5px; border: 15px solid var(--red-d); z-index: -1;
}
.ribbon::before { left: -20px; border-left-color: transparent; }
.ribbon::after { right: -20px; border-right-color: transparent; }

/* ============ 搜索与分类 ============ */
.search-row { margin: 14px 0 10px; }
.search-input {
  border-radius: 999px; padding-left: 18px;
  background: linear-gradient(180deg, #fff, #f7efdf);
}
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; font-size: .9rem; padding: 7px 16px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe06a, #ffc93c); color: #7c4a00;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.chip-active {
  background: linear-gradient(180deg, #f5564a, #d63a24); color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.3);
}

/* ============ 菜品卡（关卡卡） ============ */
.dish-list { display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.dish-card {
  position: relative; display: flex; gap: 14px; align-items: center;
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: 0 7px 0 var(--ink), 0 13px 18px rgba(0,0,0,.16), inset 0 3px 0 #fff;
  padding: 14px; margin: 0 2px;
}
.dish-tile {
  width: 92px; height: 92px; flex-shrink: 0; border-radius: 16px; position: relative;
  background: radial-gradient(circle at 50% 30%, #ffedc9, #ffd98f);
  border: 3.5px solid var(--ink);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.08), inset 0 3px 0 rgba(255,255,255,.6);
}
.dish-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 12px;
}
.dish-tile .pot-wrap { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); }
.dish-tile .arc { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); display: flex; z-index: 2; }
.dish-tile .arc svg { filter: drop-shadow(0 2px 1px rgba(0,0,0,.15)); }
.dish-tile .arc svg:nth-child(1) { transform: rotate(-14deg) translateY(5px); }
.dish-tile .arc svg:nth-child(3) { transform: rotate(14deg) translateY(5px); }
.steam path { animation: steam 1.6s ease-in-out infinite alternate; }
@keyframes steam { from { transform: translateY(1.5px); opacity: .55; } to { transform: translateY(-2px); opacity: 1; } }

.dish-info { flex: 1; min-width: 0; }
.dish-name { font-size: 1.25rem; letter-spacing: 1px; text-shadow: 0 1px 0 #fff; }
.dish-meta { font-size: .76rem; color: var(--tan); margin-top: 3px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tag {
  display: inline-block; background: linear-gradient(180deg, #ffe06a, #ffc93c); color: #7c4a00;
  border: 2.5px solid var(--ink); font-size: .7rem; padding: 2px 10px; border-radius: 999px;
  margin-top: 7px; margin-right: 5px; transform: rotate(-2deg);
  box-shadow: 0 2.5px 0 var(--ink), inset 0 1.5px 0 rgba(255,255,255,.5);
}
.tag-gray {
  background: linear-gradient(180deg, #e7e0d2, #d5cab5); color: #6d6155; transform: rotate(2deg);
}

.dish-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.play-btn {
  width: 54px; height: 54px; border-radius: 50%; position: relative;
  background: linear-gradient(180deg, #7fdb5c, #3f9e28); border: 3.5px solid var(--ink);
  box-shadow: 0 6px 0 var(--ink), 0 10px 12px rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
}
.play-btn::after {
  content: ""; position: absolute; top: 6px; left: 10px; width: 15px; height: 7px;
  border-radius: 50%; background: rgba(255, 255, 255, .55); transform: rotate(-18deg);
}
.play-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.qty-group { display: flex; align-items: center; gap: 7px; }
.qty-btn {
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.15rem; line-height: 1;
  background: linear-gradient(180deg, #fff, #f1e6d2); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 0 3.5px 0 var(--ink), inset 0 2px 0 #fff;
}
.qty-btn.plus { background: linear-gradient(180deg, #7fdb5c, #3f9e28); color: #fff; }
.qty-btn:active { transform: translateY(3px); box-shadow: 0 .5px 0 var(--ink); }
.qty-num {
  min-width: 26px; text-align: center; font-size: 1.1rem;
  text-shadow: 0 1px 0 #fff;
}

.sold-out .dish-tile { filter: grayscale(.9); opacity: .8; }
.sold-out .dish-name { color: #9a8a72; }
.soldout-tag {
  position: absolute; left: -6px; top: -10px; z-index: 3;
  background: linear-gradient(180deg, #8d99a6, #5d6570); color: #fff;
  border: 2.5px solid var(--ink); font-size: .68rem; padding: 3px 10px; border-radius: 999px;
  transform: rotate(-6deg); box-shadow: 0 2.5px 0 var(--ink);
}

/* ============ 按钮 ============ */
.btn {
  border-radius: 14px; padding: 11px 20px; font-size: 1rem; letter-spacing: 1px;
  border: 3.5px solid var(--ink);
}
.btn:active { transform: translateY(4px); }
.btn:disabled { opacity: .55; }
.btn-fire {
  background: linear-gradient(180deg, #f5564a, #d63a24); color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .3); border-color: var(--red-dd);
  box-shadow: 0 5px 0 #6d1509, inset 0 3px 0 rgba(255,255,255,.3);
}
.btn-fire:active { box-shadow: 0 1px 0 #6d1509; }
.btn-go {
  background: linear-gradient(180deg, #7fdb5c, #3f9e28); color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25); border-color: var(--green-d);
  box-shadow: 0 5px 0 #1b3d11, inset 0 3px 0 rgba(255,255,255,.4);
}
.btn-go:active { box-shadow: 0 1px 0 #1b3d11; }
.btn-wood {
  background: linear-gradient(180deg, #ab7038, #7f4e24); color: #ffe9b3;
  text-shadow: 0 1.5px 0 var(--wood-d); border-color: var(--wood-d);
  box-shadow: 0 5px 0 var(--wood-dd), inset 0 3px 0 rgba(255,255,255,.22);
}
.btn-wood:active { box-shadow: 0 1px 0 var(--wood-dd); }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-small { padding: 7px 14px; font-size: .82rem; border-radius: 11px; border-width: 3px; }

.input {
  width: 100%; padding: 12px 14px; font-size: .95rem;
  border: 3px solid var(--ink); border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fdf8ee); color: var(--ink);
  font-family: inherit; box-shadow: inset 0 2px 3px rgba(74,44,23,.08);
}
.input:focus { outline: none; border-color: var(--red); }
textarea.input { resize: vertical; }

/* ============ 点单篮 ============ */
.cart-item {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 3.5px solid var(--ink); border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 #fff;
  padding: 14px 16px; margin-bottom: 14px;
}
.cart-name { font-size: 1.1rem; }
.cart-footer { margin-top: 18px; }
.cart-footer .input { margin-bottom: 6px; }

/* ============ 订单页 ============ */
.order-card {
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 4px solid var(--ink); border-radius: 20px;
  box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 #fff;
  padding: 14px 16px; margin-bottom: 18px;
}
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-who { font-size: 1rem; }
.status {
  font-size: .72rem; padding: 3px 12px; border-radius: 999px;
  border: 2.5px solid var(--ink); box-shadow: 0 2.5px 0 var(--ink);
}
.st-pending { background: linear-gradient(180deg, #ffe06a, #ffc93c); color: #7c4a00; }
.st-cooking { background: linear-gradient(180deg, #f5564a, #d63a24); color: #fff; text-shadow: 0 1.5px 0 rgba(0,0,0,.3); }
.st-done { background: linear-gradient(180deg, #7fdb5c, #3f9e28); color: #fff; text-shadow: 0 1.5px 0 rgba(0,0,0,.25); }
.st-cancelled { background: linear-gradient(180deg, #d9d2c4, #beb4a0); color: #6d6155; }
.order-items { line-height: 1.8; font-size: .95rem; }
.order-note {
  margin-top: 8px; font-size: .8rem; color: var(--tan);
  background: rgba(255, 210, 62, .18); border: 2px dashed #d9b98a;
  border-radius: 10px; padding: 8px 10px;
}
.order-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.order-time { font-size: .72rem; color: var(--tan); }
.order-actions { display: flex; gap: 8px; }

/* ============ 管理页 ============ */
.manage-item {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 3.5px solid var(--ink); border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 #fff;
  padding: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.manage-thumb {
  width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, #ffedc9, #ffd98f);
  border: 3px solid var(--ink); position: relative;
}
.manage-thumb img { width: 100%; height: 100%; object-fit: cover; }
.manage-thumb .pot-mini { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); }
.manage-info { flex: 1; min-width: 110px; }
.manage-info .dish-meta { margin-top: 2px; }
.manage-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============ 底部导航（木质） ============ */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 35;
  width: calc(100% - 20px); max-width: 620px;
  display: flex; gap: 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  position: relative; flex: 1;
  background: linear-gradient(180deg, #ab7038, #7f4e24);
  border: 4px solid var(--wood-d); border-radius: 16px; padding: 7px 0 8px;
  font-size: .78rem; letter-spacing: 1px; color: #e8c795;
  box-shadow: 0 5px 0 var(--wood-dd), inset 0 3px 0 rgba(255,255,255,.22);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wood-dd); }
.tab.active {
  background: linear-gradient(180deg, #f5564a, #d63a24);
  border-color: #9c2413; color: #fff;
  box-shadow: 0 5px 0 #6d1509, inset 0 3px 0 rgba(255,255,255,.3);
}
.badge {
  position: absolute; top: -8px; right: calc(50% - 30px);
  min-width: 22px; height: 22px; padding: 0 5px;
  background: linear-gradient(180deg, #ffe06a, #ffc93c); color: #7c4a00;
  border: 2.5px solid var(--ink); border-radius: 999px;
  font-size: .72rem; line-height: 17px; text-align: center;
  box-shadow: 0 2px 0 var(--ink);
}
.badge.bounce { animation: bounce .45s; }
@keyframes bounce {
  0% { transform: scale(1); } 35% { transform: scale(1.55) rotate(8deg); }
  70% { transform: scale(.85); } 100% { transform: scale(1); }
}

/* ============ 弹窗（菜谱书） ============ */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(43, 24, 12, .55); }
.modal-body {
  position: relative; width: calc(100% - 16px); max-width: 632px; max-height: 86vh;
  overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 5px solid var(--ink); border-bottom: none;
  border-radius: 26px 26px 0 0; padding: 26px 18px 30px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.3), inset 0 4px 0 #fff;
  animation: slideUp .3s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes slideUp { from { transform: translateY(60px); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-tab {
  position: absolute; top: -1px; left: 50%; transform: translate(-50%, -46%) rotate(-1deg);
  background: linear-gradient(180deg, #ffe06a, #ffc93c); color: #7c4a00;
  border: 3.5px solid var(--ink); border-radius: 999px;
  font-size: 1rem; padding: 8px 24px; white-space: nowrap;
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.55);
}
.modal-body h3 { font-size: 1.35rem; letter-spacing: 1px; margin-bottom: 4px; text-shadow: 0 1px 0 #fff; }
.modal-body h4 {
  margin: 18px 0 8px; font-size: .95rem; color: #b5432f; letter-spacing: 1px;
}
.detail-photo {
  width: 100%; max-height: 250px; object-fit: cover;
  border: 3.5px solid var(--ink); border-radius: 16px; margin: 10px 0 4px;
  box-shadow: 0 4px 0 rgba(74,44,23,.3);
}
.detail-tile { text-align: center; padding: 8px 0 0; }
.detail-stars { display: flex; gap: 4px; margin-top: 6px; }

/* 表单 */
.field { display: block; margin-top: 14px; }
.field-row { display: flex; gap: 12px; align-items: flex-end; }
.field-row .grow { flex: 1; }
.field-label { display: block; font-size: .8rem; color: var(--tan); margin-bottom: 6px; }
.photo-field { margin-top: 16px; }
.photo-upload-button {
  position: relative; min-height: 104px; width: 100%; overflow: hidden;
  display: flex; align-items: center; gap: 13px; padding: 15px 14px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255,255,255,.45) 0 20px, transparent 21px),
    linear-gradient(180deg, #ffe776, #ffc83d);
  border: 3.5px solid var(--ink); border-radius: 20px;
  box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 rgba(255,255,255,.62);
  cursor: pointer; transition: transform .08s, box-shadow .08s, filter .15s;
}
.photo-upload-button::after {
  content: ""; position: absolute; right: -17px; bottom: -22px;
  width: 70px; height: 70px; border: 3px solid rgba(124,74,0,.12);
  border-radius: 50%; pointer-events: none;
}
.photo-upload-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ink), inset 0 3px 0 rgba(255,255,255,.55);
}
.file-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.file-input:focus-visible ~ .photo-upload-copy strong {
  text-decoration: underline; text-decoration-thickness: 3px;
}
.photo-upload-icon {
  display: grid; place-items: center; flex: 0 0 64px; height: 64px;
  font-size: 2.15rem; line-height: 1;
  background: linear-gradient(180deg, #fffdf6, #f7eeda);
  border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 #fff;
  transform: rotate(-4deg);
}
.photo-upload-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.photo-upload-copy strong {
  color: #7c4a00; font-size: 1.08rem; letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}
.photo-upload-copy small { color: #9a6410; font-size: .72rem; line-height: 1.3; }
.photo-upload-action {
  position: relative; z-index: 1; flex-shrink: 0; padding: 6px 9px;
  color: #fff; font-size: .7rem; letter-spacing: 1px;
  background: linear-gradient(180deg, #f5564a, #d63a24);
  border: 2.5px solid var(--red-dd); border-radius: 999px;
  box-shadow: 0 3px 0 #6d1509, inset 0 2px 0 rgba(255,255,255,.3);
  transform: rotate(2deg);
}
.photo-preview { position: relative; margin-top: 12px; }
.photo-preview::after {
  content: "装盘完成 ✓"; position: absolute; right: 9px; bottom: 10px;
  padding: 5px 10px; color: #fff; font-size: .7rem; letter-spacing: 1px;
  background: linear-gradient(180deg, #7fdb5c, #3f9e28);
  border: 2px solid var(--green-d); border-radius: 999px;
  box-shadow: 0 2px 0 #1b3d11; transform: rotate(-3deg);
}
.photo-preview img {
  display: block; width: 100%; max-height: 220px; object-fit: cover;
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 0 4px 0 rgba(74,44,23,.25);
}
.diff-picker { display: flex; gap: 4px; }
.diff-picker button { background: none; border: none; padding: 2px; }
.diff-picker button:active { transform: scale(1.2); }
.fav-field { text-align: center; }
.fav-check { display: none; }
.fav-label {
  display: inline-block; font-size: 1.3rem; filter: grayscale(1); opacity: .45;
  transition: all .15s; padding: 4px 10px; border: 3px solid var(--ink);
  border-radius: 12px; background: #fff; box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.fav-check:checked + .fav-label { filter: none; opacity: 1; background: #ffe9e3; transform: rotate(-4deg) scale(1.08); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.form-actions .btn { min-width: 104px; }

/* AI 写菜谱 */
.modal-top { z-index: 45; }
.ai-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.ai-bar .btn:disabled { opacity: .7; }
.ai-link {
  font: inherit; font-size: .8rem; color: var(--tan); background: none; border: none;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 2px;
}
.ai-hint { font-size: .72rem; color: var(--tan); margin-top: 6px; line-height: 1.5; }
.ai-note { font-size: .8rem; color: var(--ink); line-height: 1.6; margin-top: 12px; }
#aiModal .form-actions .btn { min-width: 0; flex: 1; }

@media (max-width: 390px) {
  .photo-upload-button { gap: 10px; padding: 13px 11px; }
  .photo-upload-icon { flex-basis: 56px; height: 56px; font-size: 1.9rem; }
  .photo-upload-copy strong { font-size: .98rem; }
  .photo-upload-action { padding: 5px 7px; font-size: .65rem; }
}

/* ============ START 开场屏 ============ */
.start-screen {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  background:
    radial-gradient(rgba(0, 0, 0, .05) 1px, transparent 1.4px),
    repeating-conic-gradient(#f8ead8 0% 25%, #f2decb 0% 50%);
  background-size: 18px 18px, 56px 56px;
  display: flex; align-items: center; justify-content: center;
}
.start-screen .sunburst { top: 50%; margin-top: -215px; }
.start-inner { position: relative; text-align: center; padding: 24px; width: 100%; max-width: 420px; }
.logo-board {
  display: inline-block; position: relative;
  background: linear-gradient(180deg, #ab7038 0%, var(--wood) 55%, #7f4e24 100%);
  padding: 16px 28px 13px; border: 5px solid var(--wood-d); border-radius: 18px;
  box-shadow: 0 8px 0 var(--wood-dd), 0 14px 24px rgba(0,0,0,.3), inset 0 4px 0 rgba(255,255,255,.25), inset 0 -4px 0 rgba(0,0,0,.2);
  transform: rotate(-1.2deg);
}
.logo-board h1 {
  font-size: 30px; color: #ffe9b3; letter-spacing: 2px;
  text-shadow: 0 3px 0 var(--wood-d), 0 5px 4px rgba(0,0,0,.4);
}
.start-screen .ribbon-wrap { margin-top: -6px; }
.start-tip { margin: 26px 0 14px; font-size: 1rem; color: var(--tan); letter-spacing: 2px; }
.char-row { display: flex; gap: 14px; justify-content: center; }
.char-card {
  flex: 1; max-width: 160px; padding: 16px 8px 14px;
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 4px solid var(--ink); border-radius: 20px;
  box-shadow: 0 6px 0 var(--ink), inset 0 3px 0 #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.char-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.char-card.selected {
  background: linear-gradient(180deg, #ffe06a, #ffc93c);
  transform: scale(1.05);
  box-shadow: 0 6px 0 var(--ink), 0 0 0 5px rgba(255, 210, 62, .45), inset 0 3px 0 rgba(255,255,255,.5);
}
.char-name { font-size: 1.05rem; margin-top: 4px; }
.char-desc { font-size: .72rem; color: var(--tan); }
.start-btn {
  margin-top: 26px; width: 82%; padding: 15px 0;
  background: linear-gradient(180deg, #7fdb5c, #3f9e28); color: #fff;
  font-size: 1.25rem; letter-spacing: 4px; border-radius: 999px;
  border: 4px solid var(--green-d); text-shadow: 0 2px 0 rgba(0,0,0,.3);
  box-shadow: 0 7px 0 #1b3d11, 0 12px 18px rgba(0,0,0,.25), inset 0 3px 0 rgba(255,255,255,.4);
  animation: pulse 1.6s ease-in-out infinite;
}
.start-btn:disabled { animation: none; filter: grayscale(.7); opacity: .6; }
.start-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #1b3d11 !important; }
/* 待机光圈扩散（不改变几何尺寸） */
@keyframes pulse {
  0%, 100% { box-shadow: 0 7px 0 #1b3d11, 0 12px 18px rgba(0,0,0,.25), 0 0 0 0 rgba(127,219,92,.55), inset 0 3px 0 rgba(255,255,255,.4); }
  50% { box-shadow: 0 7px 0 #1b3d11, 0 12px 18px rgba(0,0,0,.25), 0 0 0 14px rgba(127,219,92,0), inset 0 3px 0 rgba(255,255,255,.4); }
}
.pass-input { max-width: 260px; margin: 0 auto; text-align: center; letter-spacing: 4px; }
.error-text { color: var(--red-d); font-size: .85rem; margin-top: 8px; }

/* ============ 下单成功盖章 ============ */
.stamp-overlay {
  position: fixed; inset: 0; z-index: 55; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: rgba(43, 24, 12, .25);
}
.stamp {
  background: linear-gradient(180deg, var(--cream), var(--paper));
  border: 5px solid var(--ink); border-radius: 24px;
  box-shadow: 0 8px 0 var(--ink), 0 16px 30px rgba(0,0,0,.35), inset 0 4px 0 #fff;
  padding: 22px 34px; text-align: center; transform: rotate(-4deg);
  animation: stampIn .5s cubic-bezier(.2, 2.2, .5, 1);
}
.stamp-text { font-size: 1.5rem; letter-spacing: 3px; margin-top: 6px; line-height: 1.5; text-shadow: 0 1px 0 #fff; }
@keyframes stampIn {
  0% { transform: rotate(-4deg) scale(2.4); opacity: 0; }
  60% { transform: rotate(-4deg) scale(.92); opacity: 1; }
  100% { transform: rotate(-4deg) scale(1); }
}

/* ============ Toast（木牌弹出） ============ */
.toast {
  position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%);
  z-index: 62; max-width: 86vw; text-align: center;
  background: linear-gradient(180deg, #ab7038, #7f4e24); color: #ffe9b3;
  border: 3.5px solid var(--wood-d); border-radius: 14px;
  padding: 11px 20px; font-size: .9rem; letter-spacing: 1px;
  text-shadow: 0 1.5px 0 var(--wood-d);
  box-shadow: 0 5px 0 var(--wood-dd), 0 10px 16px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.22);
  animation: toastIn .3s cubic-bezier(.34, 1.5, .64, 1);
}
@keyframes toastIn { from { transform: translate(-50%, 18px) scale(.8); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
.toast-error { background: linear-gradient(180deg, #f5564a, #d63a24); color: #fff; border-color: var(--red-dd); box-shadow: 0 5px 0 #6d1509, 0 10px 16px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.25); }

/* ============ 宽屏 / 折叠屏展开（如 Mate X6）适配 ============ */
@media (min-width: 700px) {
  main, .app-header { max-width: 940px; }
  .tabbar { max-width: 920px; }
  /* 菜单与管理列表变双列，铺满大屏不显空旷 */
  .dish-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  }
  .dish-list .dish-card { margin: 0; }
  #manageList {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
  }
  #manageList .manage-item { margin-bottom: 0; }
  #cartList {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  }
  #cartList .cart-item { margin-bottom: 0; }
  /* 弹窗在大屏上居中显示而非贴底 */
  .modal { align-items: center; padding: 24px; }
  .modal-body { border-radius: 26px; border-bottom: 5px solid var(--ink); max-height: 80vh; }
  /* 开场屏的角色卡在大屏上不用挤 */
  .start-inner { max-width: 480px; }
}
