/* 陈姐 Home-made · 客户菜单
   Layout: 手机优先，单栏菜单流；分类标签吸顶，已选栏悬浮底部；照片是主角 */
:root {
  --bg: #f6f0e6;          /* 米白奶油底 */
  --paper: #fffcf6;       /* 纸面 */
  --ink: #2a211c;         /* 墨色正文 */
  --ink-2: #6f6157;       /* 次要文字 */
  --ink-3: #a3958a;       /* 辅助文字 */
  --line: #e8ddcf;        /* 分隔线 */
  --brand: #8c2f2b;       /* 枣红 */
  --brand-deep: #6f2320;
  --brand-tint: #f3e3dc;
  --green: #3d5446;       /* 墨绿 */
  --green-tint: #e3e9e1;
  --shadow: 0 1px 2px rgba(62, 40, 26, .08), 0 6px 18px rgba(62, 40, 26, .10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 960px; margin: 0 auto; padding-inline: 16px; }

/* ---------- 顶部品牌 ---------- */
.masthead { text-align: center; padding-block: 26px 18px; }
.masthead .logo { height: 76px; width: auto; margin: 0 auto; }
.masthead .tagline { margin-top: 10px; font-size: 12.5px; letter-spacing: .32em; color: var(--ink-2); padding-left: .32em; }
.masthead .intro { margin-top: 12px; font-family: var(--serif); font-size: 15px; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.masthead .intro::before, .masthead .intro::after { content: ""; width: 22px; height: 1px; background: var(--ink-3); opacity: .6; }

/* ---------- 分类标签 ---------- */
.tabs {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(246, 240, 230, .94); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { max-width: 960px; margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; scroll-padding-inline: 16px; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
  white-space: nowrap; transition: background .15s, color .15s;
}
.tab.active { background: var(--ink); color: var(--paper); font-weight: 600; }
.tab .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 2px; }
.tab.active .dot { background: #b9d0bd; }

/* ---------- 菜单分区 ---------- */
.menu { padding-block: 6px 40px; }
.section { padding-top: 22px; scroll-margin-top: 64px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: .04em; text-wrap: balance; }
.sec-head .count { font-size: 12.5px; color: var(--ink-3); }
.sec-head .note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.sec-head .mark { width: 4px; height: 16px; border-radius: 2px; background: var(--brand); align-self: center; }
.sec-today .sec-head .mark { background: var(--green); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.dish { min-width: 0; }
.dish .ph { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: #ebe2d6; max-width: 100%; }
.dish .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .3s; }
.dish .tag { position: absolute; top: 8px; left: 8px; font-size: 11px; line-height: 1; padding: 5px 7px 4px; border-radius: 6px; background: rgba(255, 252, 246, .92); color: var(--brand); font-weight: 600; letter-spacing: .06em; }
.dish .tag.today { color: var(--green); }
.dish .name { margin-top: 9px; font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish .price { margin-top: 2px; font-size: 13.5px; color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; }
.dish.picked .ph { box-shadow: 0 0 0 2px var(--brand); }

/* ＋ 按钮 / 数量步进器（叠放在照片右下角） */
.qty { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; }
.btn-add, .step {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
}
.btn-add { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(111, 35, 32, .35); }
.btn-add:active { transform: scale(.92); }
.stepper { display: flex; align-items: center; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow); padding: 3px; gap: 2px; }
.stepper .step { width: 32px; height: 32px; }
.stepper .minus { color: var(--ink); border: 1.5px solid var(--line); }
.stepper .plus { background: var(--brand); color: #fff; }
.stepper .n { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.step:active { transform: scale(.9); }
svg.i { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.stepper svg.i { width: 15px; height: 15px; }

.empty { text-align: center; color: var(--ink-2); padding: 60px 0; font-family: var(--serif); }
.foot { text-align: center; color: var(--ink-3); font-size: 12px; padding: 10px 0 30px; letter-spacing: .1em; }
body.has-bar .foot { padding-bottom: calc(110px + var(--safe-b)); }

/* ---------- 底部已选栏 ---------- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; pointer-events: none;
  padding: 0 12px calc(12px + var(--safe-b));
  transform: translateY(130%); visibility: hidden; transition: transform .25s ease, visibility .25s;
}
.bar.show { transform: none; visibility: visible; }
.bar-inner {
  pointer-events: auto; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 7px 7px 7px 18px;
  box-shadow: 0 10px 30px rgba(42, 33, 28, .28);
}
.bar .bowl { position: relative; width: 26px; height: 26px; flex: none; color: #f0e2cf; }
.bar .bowl svg { width: 26px; height: 26px; }
.bar .txt { flex: 1; min-width: 0; line-height: 1.25; }
.bar .txt b { font-size: 15.5px; font-weight: 600; }
.bar .txt small { display: block; font-size: 12px; color: #bfb0a2; }
.bar .go { height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- 子页面通用 ---------- */
.page { min-height: 100vh; padding-bottom: calc(110px + var(--safe-b)); }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(246, 240, 230, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { max-width: 640px; height: 52px; display: flex; align-items: center; gap: 8px; }
.back { height: 36px; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 14.5px; padding-right: 8px; }
.topbar .title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 600; font-size: 16px; }
.narrow { max-width: 640px; }
.page-head { text-align: center; padding-block: 24px 6px; }
.page-head .logo { height: 44px; margin: 0 auto; }
.page-head h1 { margin: 12px 0 0; font-family: var(--serif); font-size: 22px; letter-spacing: .06em; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }

.card { background: var(--paper); border-radius: 18px; border: 1px solid var(--line); }
.list { margin-top: 18px; padding: 4px 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row .th { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; background: #ebe2d6; }
.row .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.35; }
.row .nm small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.row .stepper { box-shadow: none; border: 1px solid var(--line); }
.row .x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); flex: none; }
.row .x svg.i { width: 16px; height: 16px; }
.row .q { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sum-line { display: flex; justify-content: space-between; padding: 12px 2px 4px; color: var(--ink-2); font-size: 14px; }
.sum-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.more-link { display: flex; justify-content: center; margin-top: 14px; }
.ghost { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }

.field { margin-top: 22px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.field label span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
textarea, input[type="text"], input[type="tel"] {
  width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink); resize: vertical;
}
textarea { min-height: 88px; }
textarea::placeholder, input::placeholder { color: var(--ink-3); }
.toggle-more { margin-top: 14px; color: var(--ink-2); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.two { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .two { grid-template-columns: 1fr 1fr; } }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 70%, rgba(246, 240, 230, 0)); }
.dock .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.primary { flex: 1; height: 52px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: 16.5px; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(111, 35, 32, .25); }
.primary:disabled { opacity: .55; }
.primary:active { background: var(--brand-deep); }
.secondary { flex: 1; height: 52px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 15.5px; border: 1px solid var(--line); }

/* ---------- 确认完成 ---------- */
.done-mark { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.done-mark svg.i { width: 26px; height: 26px; stroke-width: 2.6; }
.ticket { margin-top: 20px; padding: 22px 20px 18px; position: relative; }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 14px; right: 14px; height: 8px; background: radial-gradient(circle at 4px 4px, var(--bg) 3px, transparent 3.5px) 0 0 / 12px 8px repeat-x; }
.ticket::before { top: -4px; } .ticket::after { bottom: -4px; }
.ticket h3 { margin: 0; text-align: center; font-family: var(--serif); font-size: 19px; letter-spacing: .08em; }
.ticket .meta { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.ticket ul { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); }
.ticket li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 15.5px; }
.ticket li .lead { flex: 1; border-bottom: 1px dotted var(--ink-3); opacity: .5; transform: translateY(-4px); }
.ticket li .q { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.ticket .total { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; font-weight: 600; }
.ticket .rmk { margin-top: 12px; background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.ticket .rmk b { color: var(--ink); font-weight: 600; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.act { min-height: 74px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14.5px; padding: 10px; }
.act svg.i { width: 22px; height: 22px; color: var(--brand); stroke-width: 1.9; }
.act small { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.act.main { grid-column: 1 / -1; flex-direction: row; min-height: 54px; background: var(--brand); color: #fff; border-color: transparent; font-size: 16px; }
.act.main svg.i { color: #fff; }
.tip { margin-top: 14px; font-size: 13px; color: var(--ink-2); background: var(--green-tint); border-radius: 12px; padding: 10px 12px; line-height: 1.55; }
.tip b { color: var(--green); }
.linkrow { display: flex; justify-content: center; gap: 18px; margin-top: 22px; }
.linkrow button { color: var(--ink-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* ---------- 分享卡片弹层 / 提示 ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(30, 22, 18, .72); display: flex; flex-direction: column; align-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + var(--safe-b)); overflow-y: auto; }
.overlay .card-img { width: min(100%, 420px); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); -webkit-touch-callout: default; user-select: auto; }
.overlay .hint { color: #f5ead9; font-size: 14px; margin: 14px 0 10px; text-align: center; }
.overlay .ops { display: flex; gap: 10px; width: min(100%, 420px); }
.overlay .ops button { flex: 1; height: 46px; border-radius: 999px; font-weight: 600; background: var(--paper); color: var(--ink); }
.overlay .ops button.p { background: var(--brand); color: #fff; }
.overlay .loading { color: #f5ead9; margin-top: 40vh; }
.copybox { width: min(100%, 420px); background: var(--paper); border-radius: 16px; padding: 16px; }
.copybox textarea { min-height: 220px; font-size: 14px; }
.toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; background: rgba(42, 33, 28, .92); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; max-width: 80vw; text-align: center; pointer-events: none; }

.shared-from { display: inline-block; margin-top: 8px; font-size: 12px; letter-spacing: .1em; color: var(--green); background: var(--green-tint); border-radius: 999px; padding: 3px 10px; }
.skeleton { aspect-ratio: 1; border-radius: var(--radius); background: linear-gradient(90deg, #ece3d7, #f3ece2, #ece3d7); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
