/* 饼老大的厨房 — single stylesheet, no build step, no dependencies. */
:root {
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #2c241d;
  --muted: #7a6a5c;
  --line: #eadfd3;
  --brand: #c2571b;
  --brand-ink: #8a3c11;
  --brand-soft: #fdf0e4;
  --ok: #1f7a4d;
  --warn: #b4690e;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(44, 36, 29, .06), 0 8px 24px rgba(44, 36, 29, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
        "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", Roboto, sans-serif;
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.25; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
h4 { margin: 0 0 .25rem; font-size: 1rem; }

.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.dim { color: var(--muted); font-size: .88rem; }
.lead { font-size: 1.06rem; color: var(--muted); margin-top: 0; }
.err { color: var(--danger); margin: .3rem 0 0; font-size: .92rem; }
.ok { font-size: 2.4rem; margin: 0; }
.gap { gap: .6rem; }

/* ---------------------------------------------------------------- chrome */
.top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand b { display: block; }
.brand small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.logo { font-size: 1.7rem; }

.nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.nav a, .nav .link {
  padding: .45rem .7rem;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav a:hover, .nav .link:hover { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav .lang { border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.inline { display: inline; margin: 0; }

main { padding: 1.6rem 0 3rem; }

.flash {
  background: var(--brand-soft);
  border: 1px solid #f0d5bd;
  color: var(--brand-ink);
  padding: .7rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: .88rem;
}

/* ------------------------------------------------------------------ hero */
.hero {
  background: linear-gradient(150deg, #fff 0%, var(--brand-soft) 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(1.6rem, 1rem + 3vw, 3rem);
  margin-bottom: 1rem;
}
.hero h1 { max-width: 18ch; }
.cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.2rem 0 0; }

/* ---------------------------------------------------------------- blocks */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 1rem; }
.split { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin-bottom: 1rem;
}
.svc { display: flex; flex-direction: column; }
.svc p { flex: 1; }
.svc .row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.price { font-size: 1.35rem; font-weight: 700; color: var(--brand-ink); }
.price::before { content: "¥"; font-size: .8em; margin-right: .1em; }

.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat b { font-size: 1.7rem; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 .9rem 2.4rem; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: .1rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: .85rem; font-weight: 700;
}
.steps.plain li { padding-left: 1.6rem; }
.steps.plain li::before { content: "✓"; background: var(--brand-soft); color: var(--brand-ink); }

/* ---------------------------------------------------------------- tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: none; }
.tbl tfoot th { border-bottom: 0; font-size: 1.05rem; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.card:has(.tbl) { overflow-x: auto; }

.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 600; width: 11rem; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }

/* ----------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: .8rem; max-width: 620px; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: .5rem; }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .7rem;
  width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #e8b98f; outline-offset: 1px; border-color: #dda87a; }
.qty { width: 5rem; }
.filters { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.notice { background: var(--brand-soft); border-color: #f0d5bd; }
.notice-bar {
  background: #fff8e8;
  border: 1px solid #efdcb0;
  color: #7a5310;
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}
.hint {
  background: #f3f7fb;
  border: 1px solid #dbe6f0;
  color: #37566f;
  border-radius: var(--radius);
  padding: .7rem .9rem;
  font-size: .9rem;
  max-width: 640px;
}
.nowrap { white-space: nowrap; }
a.danger { color: var(--danger); }
span.dim[title] { cursor: help; opacity: .75; }
code { background: #f4efe9; border-radius: 5px; padding: .05rem .35rem; font-size: .9em; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: .55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); text-decoration: none; color: #fff; }
.btn.big { padding: .7rem 1.3rem; font-size: 1.02rem; }
.btn.ghost { background: #fff; color: var(--brand-ink); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand-ink); }
.btn.tiny { padding: .3rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.buy { margin: 0; }

/* ------------------------------------------------------------------ tags */
.tag {
  display: inline-block;
  padding: .18rem .6rem;
  border-radius: 999px;
  font-size: .82rem;
  background: #f1ece6;
  color: var(--muted);
  white-space: nowrap;
}
.tag.s-pending { background: #fdf0d8; color: var(--warn); }
.tag.s-pending_confirm { background: #fdf0d8; color: #9a6a00; border: 1px dashed #e0b463; }
.tag.s-paid { background: #e2f2e8; color: var(--ok); }
.tag.s-serving { background: #e3ecfb; color: #1c4f9c; }
.tag.s-done { background: #e6f4ec; color: var(--ok); }
.tag.s-cancelled { background: #f3e7e6; color: var(--danger); }
.tag.owner { background: #fdf0d8; color: #8a3c11; border: 1px solid #e6c48a; font-weight: 600; }
tr.owner-row td { background: #fffdf6; }

.badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-ink);
  border-radius: 999px;
  padding: .2rem .8rem;
  font-size: .82rem;
  font-weight: 600;
}

/* --------------------------------------------------------------- subnav */
.subnav { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.subnav a { padding: .5rem .8rem; color: var(--muted); border-bottom: 2px solid transparent; }
.subnav a.on { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------------------------------------------------------- pages */
.narrow { max-width: 520px; margin-inline: auto; }
.pay .card { max-width: 480px; margin-inline: auto; }
.qr {
  width: 190px; height: 190px;
  margin: 1rem auto;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: repeating-conic-gradient(#f6efe7 0% 25%, #fff 0% 50%) 0 / 22px 22px;
  display: grid; place-items: center;
  font-size: 2.4rem;
}
.qr-img {
  display: block;
  margin: 1rem auto .3rem;
  width: min(320px, 100%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: .5rem;
}
.amount { font-size: 1.05rem; display: flex; align-items: baseline; justify-content: center; gap: .5rem; }

/* 客服二维码：比收款码小一点，别抢主体内容的注意力 */
.qr-service {
  display: block;
  margin: .8rem auto;
  width: min(200px, 60%);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: .4rem;
}
.contact { text-align: center; }
.contact-inline { text-align: center; }
.contact-inline .qr-service { margin-top: .6rem; }

@media (max-width: 640px) {
  .wrap { width: min(1100px, 100% - 1.6rem); }
  .kv th { width: 7.5rem; }
  .tbl { font-size: .88rem; }
  .foot { flex-direction: column; gap: .3rem; }
}
