:root {
  color-scheme: light;
  --ink: #1d281d; --muted: #596353; --green: #254c34; --pale: #e6eedf;
  --paper: #f6f7f1; --line: #e1e6da; --white: #fff; --warn: #9a392e;
  font: 16px/1.5 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--paper); color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .6; }
a { color: inherit; }
button:focus-visible, a:focus-visible, :is(input,textarea,select):focus-visible { outline: 3px solid #6b924e; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1200px; width: min(100% - 56px, 1200px); margin-inline: auto; }
.top { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner, .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top-inner { min-height: 74px; }
.top nav { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17px; letter-spacing: .04em; text-decoration: none; line-height: 1.18; }
.mark { display: grid; place-items: center; width: 40px; height: 40px; color: white; background: var(--green); border-radius: 13px 13px 13px 4px; font: 700 24px/1 "Songti SC", SimSun, serif; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 500; }
.plain, .secondary, .primary, .filters button { min-height: 42px; border-radius: 10px; padding: 8px 14px; font-size: 14px; font-weight: 700; }
.plain { background: transparent; }
.plain:hover, .secondary:hover { background: var(--pale); }
.admin-link, .secondary { border: 1px solid var(--line); background: var(--white); }
.primary { background: var(--green); color: white; }
.primary:hover { background: #193b26; }
#customer { padding-top: 26px; }
.menu-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.menu-heading h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; }
.menu-heading span { color: var(--muted); font-size: 14px; }
.table-badge { padding: 7px 13px; min-height: 42px; border-radius: 22px; border: 1px solid #cfdacb; color: var(--green); background: var(--pale); font-weight: 700; font-size: 14px; white-space: nowrap; }
.table-badge:hover { background: #d8e7d1; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 306px; align-items: start; gap: 24px; }
.section-head h2 { font-size: 23px; line-height: 1.2; }
.section-head > span { font-size: 14px; color: var(--muted); }
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0; }
.filters button { min-height: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); white-space: nowrap; }
.filters button[aria-pressed="true"] { border-color: var(--green); color: white; background: var(--green); }
.items { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.item { min-width: 0; display: grid; grid-template-columns: 76px minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 94px; background: white; border: 1px solid var(--line); border-radius: 15px; padding: 8px 11px 8px 8px; }
.thumb { display: block; height: 76px; width: 76px; border-radius: 10px; object-fit: cover; background: #f0f2eb; }
.item h3 { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.price { color: var(--green); font-weight: 800; margin-top: 3px; }
.step { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.step button { width: 34px; height: 34px; border-radius: 50%; color: var(--green); background: var(--pale); font-size: 19px; display: grid; place-items: center; line-height: 1; }
.step button:last-child { color: white; background: var(--green); }
.step button:hover { box-shadow: 0 0 0 2px #8ba387; }
.step span { font-size: 14px; min-width: 13px; text-align: center; }
.basket, .board { background: var(--white); border: 1px solid var(--line); border-radius: 17px; padding: 19px; }
.basket { position: sticky; top: 16px; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.basket .empty { padding: 32px 6px 14px; }
.empty-mark { display: grid; place-items: center; background: var(--pale); color: var(--green); width: 46px; height: 46px; margin: 0 auto 9px; border-radius: 50%; font-size: 21px; }
.line-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line-item small { color: var(--muted); font-size: 13px; display: block; }
.total { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.total strong { font-size: 24px; color: var(--green); }
#checkout, .full { width: 100%; }
.footer { padding: 28px 0 35px; margin-top: 25px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.credit-list { padding-left: 24px; }
.credit-list li { margin-block: 6px; }
.mobile-cart { display: none; }
dialog { border: 1px solid var(--line); border-radius: 19px; width: min(100% - 22px, 480px); max-height: calc(100dvh - 28px); padding: 20px; color: var(--ink); box-shadow: 0 20px 66px #152a223b; }
dialog::backdrop { background: #14201791; }
.dialog-head { margin-bottom: 10px; }
.close { background: var(--pale); border-radius: 50%; width: 38px; height: 38px; font-size: 23px; line-height: 1; }
label { display: block; font-weight: 700; font-size: 14px; margin: 13px 0 6px; }
input, select, textarea { width: 100%; background: #fbfcf9; border: 1px solid #cdd7c7; border-radius: 9px; color: var(--ink); padding: 10px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #385340 50%), linear-gradient(135deg, #385340 50%, transparent 50%); background-position: calc(100% - 19px) center, calc(100% - 14px) center; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 70px; }
.notice { color: var(--warn); font-size: 14px; margin: 10px 0; }
.notice:empty { display: none; }
.copy { margin: 10px 0; color: var(--muted); }
#toast { position: fixed; z-index: 2; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 12px; max-width: calc(100% - 20px); background: #193b26; color: white; box-shadow: 0 4px 20px #16251c30; }
.admin-page { padding-top: 28px; }
.merchant-head { margin-bottom: 18px; }
.merchant-head h1 { font-size: clamp(25px, 5vw, 38px); }
#login-box { max-width: 460px; }
#login-form .primary { margin-top: 14px; width: 100%; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats { margin: 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.stat span { color: var(--muted); font-size: 14px; } .stat strong { display: block; color: var(--green); font-size: 24px; }
.order { border-top: 1px solid var(--line); padding: 12px 0; }
.order .copy { margin: 4px 0; overflow-wrap: anywhere; }
.status { display: inline-block; border-radius: 14px; background: var(--pale); padding: 3px 9px; color: var(--green); font-size: 13px; font-weight: 700; white-space: nowrap; }
.status.new { background: #faeedb; color: #7c4a16; }
.order-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.order-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.qr-card { display: grid; justify-items: center; background: #fff; margin: 12px 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.qr-card canvas { display: block; width: min(100%, 220px); height: auto; image-rendering: pixelated; }
.qr-card a { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 1050px) { .layout { grid-template-columns: minmax(0,1fr) 260px; gap: 16px; } .item { gap: 8px; } .items { grid-template-columns: 1fr; } }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 28px); }
  .top-inner { min-height: 62px; }
  .top nav { gap: 3px; }
  .top nav button { padding-inline: 8px; }
  #customer { padding-top: 17px; }
  .layout { display: block; }
  .basket { display: none; }
  .mobile-cart { display: flex; justify-content: space-between; align-items: center; position: fixed; z-index: 1; bottom: max(12px, env(safe-area-inset-bottom)); left: 14px; right: 14px; background: var(--green); color: white; border-radius: 13px; padding: 12px 16px; min-height: 52px; box-shadow: 0 5px 20px #13271d40; font-weight: 700; }
  .footer { margin-top: 22px; padding-bottom: 75px; }
  #toast { bottom: 77px; }
  .items { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 530px) { .items { grid-template-columns: 1fr; } .item { min-height: 86px; } .thumb { width: 68px; height: 68px; } .item { grid-template-columns: 68px minmax(0,1fr) auto; gap: 11px; } }
@media print { body > :not(dialog) { display: none !important; } dialog { position: static; max-height: none; border: 0; box-shadow: none; } dialog::backdrop { display: none; } dialog :is(button, select, label, .copy) { display: none; } }
