:root {
  --ink: #241f1b;
  --muted: #8b8178;
  --line: #eadfd2;
  --paper: #f4efe8;
  --card: #fff;
  --brand: #c5362b;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: #e6e0d6;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px;
}
.hint {
  margin: 0;
  max-width: 390px;
  color: #6d6258;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.phone {
  width: 390px;
  height: 812px;
  max-height: calc(100vh - 96px);
  background: #1b1b1b;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 24px 50px rgba(40, 28, 16, 0.22);
}
.phone-inner {
  position: relative;
  height: 100%;
  background: var(--paper);
  border-radius: 32px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.statusbar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 22px;
  font-size: 13px;
  font-weight: 650;
  flex: none;
}
.capsule {
  width: 78px;
  height: 28px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.72);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
.capsule b, .capsule s { display: block; background: #222; }
.capsule b { width: 16px; height: 6px; border-radius: 4px; }
.capsule i { width: 1px; height: 14px; background: rgba(0,0,0,.15); }
.capsule s { width: 7px; height: 7px; border-radius: 50%; }

.screen { flex: 1; overflow: auto; }
.screen::-webkit-scrollbar { width: 0; }
.dock { flex: none; background: #fff; border-top: 1px solid var(--line); }

.hero { padding: 6px 16px 16px; }
.hero h1 { margin: 0; font-size: 22px; letter-spacing: 0.5px; line-height: 1.3; }
.meta { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.notice {
  margin-top: 12px;
  background: #fff7e8;
  color: #8a5a12;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}
.tablebar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.tablebar b { font-size: 15px; }
.tablebar span { color: var(--muted); font-size: 12px; margin-left: 6px; }
.tablebar button, .linkish {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 650;
  padding: 0;
}
.menu-body { display: flex; align-items: flex-start; background: #fff; }
.cats {
  position: sticky;
  top: 44px;
  width: 76px;
  background: #f3eee7;
  flex: none;
}
.cats button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border: 0;
  background: transparent;
  padding: 0 8px;
  font-size: 13px;
  color: #6d645c;
}
.cats button.on {
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand);
}
.dish-col { flex: 1; min-width: 0; padding: 6px 16px 24px; }
.group h2 { margin: 16px 0 4px; font-size: 14px; font-weight: 700; }
.group + .group { margin-top: 8px; }
.dish {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid #f0e8de;
}
.thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  flex: none;
  overflow: hidden;
}
.thumb svg { width: 76px; height: 76px; display: block; }
.dish-info { flex: 1; min-width: 0; padding-top: 1px; }
.dish-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tag {
  font-size: 10px;
  color: #fff;
  background: var(--brand);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 16px;
  font-weight: 600;
}
.desc, .sales { color: var(--muted); font-size: 12px; line-height: 18px; margin-top: 4px; }
.row-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  min-height: 28px;
}
.price { color: var(--brand); font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; }
.price small { font-size: 12px; }
.add {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sold { color: #b3a89e; font-size: 12px; }

.subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 2;
}
.subhead button { border: 0; background: transparent; font-size: 20px; padding: 4px 6px; }
.subhead h1 { font-size: 16px; margin: 0; }
.card {
  background: var(--card);
  margin: 0 12px 10px;
  border-radius: 12px;
  padding: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 14px; }
.line, .sum-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  padding: 6px 0;
}
.muted { color: var(--muted); }
.seg { display: flex; background: #f3eee7; border-radius: 8px; padding: 3px; }
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 0;
  color: #6d645c;
}
.seg button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.field { margin-top: 10px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid #e4d9cc;
  background: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  color: var(--ink);
}
.field textarea { min-height: 68px; resize: vertical; }
.pay-tip { margin-top: 8px; font-size: 12px; color: #8a5a12; background: #fff7e8; border-radius: 8px; padding: 8px 10px; }
.submit {
  width: calc(100% - 24px);
  margin: 4px 12px 16px;
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 22px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
}
.submit:disabled { background: #d9d0c6; }
.steps { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; }
.steps span { flex: 1; text-align: center; font-size: 11px; color: #b3a89e; }
.steps span.done { color: var(--brand); font-weight: 700; }
.steps span.cancel { color: #a33; font-weight: 700; }

.cartbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #2a241f; color: #fff; }
.bag {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bag svg { width: 18px; height: 18px; display: block; }
.bag em {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #fff;
  color: var(--brand);
  border-radius: 10px;
  font-style: normal;
  font-size: 11px;
  min-width: 16px;
  text-align: center;
  font-weight: 750;
}
.cartbar .sum { flex: 1; font-weight: 750; }
.cartbar .go {
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 16px;
  padding: 8px 14px;
  font-weight: 700;
}
.cartbar .go:disabled { background: #5c534c; color: #b3a89e; }
.tabs { display: flex; height: 50px; }
.tabs button { flex: 1; border: 0; background: #fff; color: #8b8178; font-size: 12px; }
.tabs button.on { color: var(--brand); font-weight: 750; }

.mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px 22px;
  transform: translateY(110%);
  transition: transform .25s ease;
  z-index: 3;
  max-height: 78%;
  overflow: auto;
}
.sheet.show { transform: none; }
.sheet h3 { margin: 0 0 4px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.choices button, .qty button {
  border: 1px solid #e4d9cc;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
}
.choices button.on { border-color: var(--brand); color: var(--brand); background: #fdf3f1; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 28px; height: 28px; padding: 0; }
.sheet .submit { width: auto; margin: 0; padding: 10px 16px; }
.toast {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  background: rgba(30,24,20,.88);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.toast.show { opacity: 1; }
.tlist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tlist button { text-align: left; border: 1px solid #e4d9cc; background: #fff; border-radius: 8px; padding: 10px; }
.tlist button.on { border-color: var(--brand); background: #fdf3f1; }
.tlist b { display: block; }
.tlist small { color: var(--muted); }
.auth-head { display: flex; gap: 10px; align-items: center; }
.auth-logo, .face {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex: none;
}
.mine { padding: 8px 16px 20px; }
.mine-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.face.lg { width: 56px; height: 56px; font-size: 20px; }
.auth-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 10px 0; }
.avatar-row { display: flex; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.avatar-row button { border: 2px solid transparent; background: transparent; padding: 0; border-radius: 50%; }
.avatar-row button.on { border-color: var(--brand); }
.auth-actions { display: flex; gap: 8px; margin-top: 14px; }
.auth-actions button { flex: 1; border-radius: 20px; padding: 10px; font-weight: 700; }
.auth-actions .ghost { border: 1px solid #e4d9cc; background: #fff; color: var(--ink); }
.auth-actions .ok { border: 0; background: var(--brand); color: #fff; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

@media (max-width: 520px) {
  body { background: var(--paper); }
  .stage { padding: 0; justify-content: flex-start; }
  .hint { display: none; }
  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .phone-inner { border-radius: 0; }
  .statusbar { display: none; }
}
