:root {
  color-scheme:light;
  --ink:#20332a;
  --muted:#5b695f;
  --green:#165a42;
  --deep:#113e30;
  --soft:#e1ecdf;
  --paper:#f9f7ef;
  --white:#fffefa;
  --line:#d9ded2;
  --red:#a83b29;
  --peach:#f8e5db;
  --amber:#80581a;
  --gold:#f4ead2;
  --radius:14px;
  font-family:"DM Sans","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-size:16px
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,input,select,textarea {
  font:inherit
}

button,a {
  touch-action:manipulation
}

button {
  color:inherit;
  cursor:pointer
}

button:disabled {
  cursor:wait;
  opacity:.62
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #b67d34;
  outline-offset:3px
}

a {
  color:var(--green);
  text-decoration-thickness:1px;
  text-underline-offset:3px
}

button {
  border:0;
  background:none
}

h1,h2,h3,p {
  margin:0
}

h1,h2,h3 {
  line-height:1.28
}

h1 {
  font-size:clamp(1.6rem,3.5vw,2.5rem);
  font-weight:720;
  letter-spacing:-.04em
}

h2 {
  font-size:1.3rem
}

h3 {
  font-size:1.06rem
}

p {
  line-height:1.58
}

.muted,.meta {
  color:var(--muted)
}

.meta {
  font-size:.875rem;
  line-height:1.5
}

.overline {
  font-size:.79rem;
  letter-spacing:.07em;
  font-weight:730;
  color:var(--green)
}

.money {
  font-variant-numeric:tabular-nums;
  font-weight:750
}

.red,.money.red {
  color:var(--red)
}

.nowrap {
  white-space:nowrap
}

.loading {
  padding:4rem;
  text-align:center
}

.hidden,[hidden] {
  display:none!important
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:1.1rem;
  font-weight:740;
  letter-spacing:-.02em;
  color:inherit;
  text-decoration:none
}

.mark {
  display:inline-grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:10px;
  background:var(--green);
  color:#fff6d7;
  line-height:1;
  font-size:21px;
  font-weight:760
}

.brand .mark {
  transform:rotate(-3deg)
}

.top {
  position:sticky;
  top:0;
  z-index:4;
  background:rgba(249,247,239,.97);
  border-bottom:1px solid var(--line);
  padding:0 max(18px,calc((100% - 1080px)/2));
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:64px;
  gap:14px
}

.top .right {
  display:flex;
  align-items:center;
  gap:12px
}

.back {
  color:var(--green);
  font-weight:650;
  min-height:40px;
  font-size:.9rem
}

.view {
  width:min(1080px,100%);
  margin:auto;
  padding:30px 20px 112px
}

.section-head,.row,.between,.intro,.toolbar,.actionbar {
  display:flex;
  align-items:center;
  gap:12px
}

.between,.intro,.section-head {
  justify-content:space-between
}

.intro {
  align-items:flex-end;
  margin:0 0 22px
}

.intro .overline {
  margin-bottom:6px
}

.intro p {
  margin-top:6px
}

.stack {
  display:grid;
  gap:14px
}

.section-head {
  margin:16px 0 11px
}

.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));
  gap:12px
}

.two {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}

.panel,.card,.tile,.list,.product {
  border:1px solid var(--line);
  background:var(--white);
  border-radius:var(--radius)
}

.panel {
  padding:19px
}

.card,.tile {
  padding:16px
}

.tile {
  text-align:left;
  min-height:88px;
  display:grid;
  gap:6px;
  align-content:start
}

.tile:hover,.product:hover,.table-card:hover,.list-button:hover {
  border-color:#82a18d;
  background:#f6faf3
}

.tile b {
  font-size:1.04rem
}

.tile .icon-chip {
  margin-bottom:3px;
  display:inline-grid;
  place-items:center;
  width:34px;
  height:32px;
  border-radius:8px;
  background:var(--soft);
  color:var(--green);
  font-weight:740
}

.tag {
  display:inline-block;
  font-size:.8rem;
  padding:4px 9px;
  border-radius:99px;
  background:var(--soft);
  color:var(--green);
  font-weight:680;
  white-space:nowrap;
  line-height:1.3
}

.tag.warn {
  color:var(--amber);
  background:var(--gold)
}

.tag.danger {
  color:var(--red);
  background:var(--peach)
}

.tag.dim {
  color:#536359;
  background:#e9ede5
}

.hero {
  padding:22px;
  border-radius:var(--radius);
  background:var(--deep);
  color:#fffbed
}

.hero .meta,.hero .overline {
  color:#d7e7d8
}

.hero strong {
  font-size:clamp(1.75rem,4vw,2.5rem);
  display:block;
  margin:.25rem 0;
  letter-spacing:-.04em
}

.hero .tag {
  background:#dbe9cf
}

.stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px
}

.stat {
  padding:15px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--white)
}

.stat small {
  display:block;
  color:var(--muted);
  margin-bottom:5px
}

.stat b {
  font-size:clamp(1.1rem,3.2vw,1.7rem);
  line-height:1.35;
  overflow-wrap:anywhere
}

.toolbar {
  flex-wrap:wrap;
  margin:12px 0
}

.filterset {
  display:flex;
  flex-wrap:wrap;
  gap:7px
}

.chip {
  border:1px solid var(--line);
  background:var(--white);
  border-radius:99px;
  min-height:40px;
  padding:6px 14px;
  color:var(--muted)
}

.chip.on,.chip[aria-pressed=true] {
  background:var(--green);
  border-color:var(--green);
  color:white
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:9px 16px;
  border:1px solid var(--green);
  border-radius:9px;
  background:var(--green);
  color:#fff;
  font-weight:700;
  text-decoration:none;
  text-align:center;
  line-height:1.4
}

.btn:hover {
  filter:brightness(.94)
}

.btn.alt {
  background:var(--white);
  color:var(--green);
  border-color:var(--line)
}

.btn.bad {
  background:var(--peach);
  border-color:#deb4a8;
  color:var(--red)
}

.btn.link {
  background:none;
  border-color:transparent;
  color:var(--green)
}

.btn.sm {
  min-height:38px;
  padding:6px 10px;
  font-size:.875rem
}

.btn.full {
  width:100%
}

.actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap
}

.actions>* {
  flex:0 1 auto
}

.foot-actions {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:6px
}

.foot-actions .btn {
  flex:1
}

.field {
  display:grid;
  gap:6px;
  color:var(--ink);
  font-size:.93rem;
  font-weight:650
}

.field input,.field select,.field textarea,.search {
  display:block;
  width:100%;
  min-height:45px;
  border:1px solid #bcc9bc;
  border-radius:8px;
  color:var(--ink);
  background:white;
  padding:10px 11px;
  line-height:1.4
}

.field textarea {
  resize:vertical
}

.field input[type=checkbox] {
  width:20px;
  height:20px;
  min-height:0
}

.check {
  display:flex;
  gap:8px;
  align-items:center;
  font-size:.94rem
}

.check input {
  accent-color:var(--green);
  width:18px;
  height:18px
}

.forms {
  display:grid;
  gap:15px
}

.form-err {
  padding:10px 12px;
  background:var(--peach);
  border-radius:7px;
  color:#8f2e19;
  font-size:.94rem
}

.help {
  font-size:.9rem;
  color:var(--muted);
  line-height:1.5
}

.banner {
  padding:12px 14px;
  background:var(--gold);
  border:1px solid #dfcea4;
  border-radius:9px;
  color:#704b14;
  line-height:1.55;
  font-size:.93rem
}

.empty {
  padding:28px 18px;
  text-align:center;
  border:1px dashed #c5d0c4;
  border-radius:var(--radius);
  color:var(--muted);
  line-height:1.6
}

.list {
  overflow:hidden
}

.list-row,.list-button {
  padding:13px 15px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  width:100%;
  border-bottom:1px solid var(--line);
  text-align:left
}

.list-row:last-child,.list-button:last-child {
  border-bottom:0
}

.list-row>*,.list-button>* {
  min-width:0;
  overflow-wrap:anywhere
}

.list-row .end,.list-button .end {
  text-align:right
}

.list-row .meta,.list-button .meta {
  margin-top:3px
}

.list-row small {
  color:var(--muted)
}

.tables {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(142px,1fr));
  gap:11px
}

.table-card {
  background:var(--white);
  min-height:111px;
  text-align:left;
  padding:13px;
  border:1px solid var(--line);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:9px
}

.table-card.used {
  background:#e9f1e4;
  border-color:#acc1a7
}

.table-card b {
  font-size:1.37rem
}

.table-card small {
  font-size:.86rem;
  color:var(--muted)
}

.kv {
  display:flex;
  justify-content:space-between;
  gap:15px;
  padding:9px 0;
  border-bottom:1px solid var(--line)
}

.kv:last-child {
  border:0
}

.kv span {
  color:var(--muted)
}

.kv strong {
  text-align:right
}

.bottomnav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:3;
  display:flex;
  justify-content:center;
  background:rgba(255,254,250,.97);
  border-top:1px solid var(--line);
  padding:4px 8px max(4px,env(safe-area-inset-bottom))
}

.bottomnav button {
  min-height:54px;
  min-width:min(30vw,150px);
  display:grid;
  justify-items:center;
  align-content:center;
  gap:3px;
  color:var(--muted);
  font-size:.84rem;
  font-weight:640
}

.bottomnav button.on {
  color:var(--green);
  background:#eff4ea;
  border-radius:8px
}

.nav-icon {
  display:inline-block;
  width:15px;
  height:15px;
  border:1.8px solid currentColor;
  border-radius:3px;
  position:relative
}

.nav-icon.table:before,.nav-icon.table:after {
  content:'';
  position:absolute;
  background:currentColor
}

.nav-icon.table:before {
  left:5.5px;
  top:0;
  bottom:0;
  width:1.5px
}

.nav-icon.table:after {
  top:5.5px;
  left:0;
  right:0;
  height:1.5px
}

.nav-icon.order:before {
  content:'≡';
  position:absolute;
  inset:-4px 0;
  text-align:center
}

.nav-icon.home {
  border-radius:50% 50% 3px 3px
}

.auth-wrap {
  min-height:100svh;
  display:grid;
  grid-template-columns:minmax(240px,1.07fr) minmax(340px,.93fr);
  max-width:1360px;
  margin:auto
}

.auth-art {
  position:relative;
  background:linear-gradient(0deg,rgba(13,29,19,.86),rgba(13,29,19,.08) 68%),url('/assets/hotpot.webp') center/cover,var(--deep);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  color:#fff9e7;
  padding:36px
}

.auth-art .brand {
  align-self:start;
  background:rgba(17,60,44,.92);
  padding:9px 12px;
  border-radius:11px
}

.auth-art h2 {
  font-family:"Songti SC","SimSun",serif;
  font-size:clamp(2rem,4.3vw,3.8rem);
  font-weight:600;
  line-height:1.24
}

.auth-pane {
  align-self:center;
  padding:48px clamp(25px,5.5vw,84px);
  width:100%
}

.auth-pane h1 {
  margin:12px 0 10px
}

.auth-pane .forms {
  margin:24px 0 14px
}

.auth-foot {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:18px
}

.auth-pane .brand {
  display:none
}

.auth-pane .overline {
  color:var(--red)
}

.catalog {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));
  gap:10px
}

.product {
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px;
  text-align:left;
  min-height:86px
}

.thumb {
  width:58px;
  height:58px;
  flex:0 0 auto;
  object-fit:cover;
  background:var(--soft);
  color:var(--green);
  border-radius:10px;
  display:grid;
  place-items:center;
  font-weight:750;
  font-size:1.15rem
}

.product .body {
  flex:1;
  min-width:0
}

.product .plus {
  border-radius:50%;
  background:var(--soft);
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  color:var(--green);
  font-size:1.3rem
}

.cartbar {
  position:sticky;
  bottom:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 14px;
  border-radius:12px;
  background:var(--deep);
  color:white;
  box-shadow:0 6px 17px #1a3a281c;
  z-index:2
}

.cartbar .btn {
  background:#e6edd5;
  color:var(--deep);
  border-color:transparent
}

dialog {
  border:0;
  padding:0;
  border-radius:16px;
  background:var(--white);
  color:var(--ink);
  width:min(505px,calc(100vw - 24px));
  max-height:min(88svh,780px);
  overflow:auto;
  box-shadow:0 18px 80px #001c2330
}

dialog::backdrop {
  background:#18352b69
}

.sheet-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:17px 20px;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  background:var(--white);
  z-index:1
}

.x {
  min-height:40px;
  min-width:40px;
  border-radius:7px;
  color:var(--muted);
  font-size:1.5rem
}

.sheet-body {
  padding:18px 20px 23px;
  display:grid;
  gap:15px
}

.sheet-body .field {
  font-size:.95rem
}

#notice {
  position:fixed;
  left:50%;
  bottom:82px;
  transform:translateX(-50%);
  border-radius:9px;
  color:white;
  background:#213d31;
  z-index:15;
  max-width:min(92vw,580px);
  padding:11px 17px;
  text-align:center;
  box-shadow:0 7px 22px #24392c22;
  pointer-events:none
}

#notice:empty {
  display:none
}

.receipt {
  padding:16px;
  max-width:320px;
  margin:0 auto;
  color:#111;
  background:#fff;
  border:1px dashed #9ba59a;
  font-family:"Courier New",monospace;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.5
}

.print-host {
  display:none
}

.cols {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px
}

@media(max-width:640px) {
  .auth-wrap {
    grid-template-columns:1fr
  }
  .auth-art {
    min-height:135px;
    max-height:160px;
    padding:19px 22px;
    background-position:center 52%
  }
  .auth-art h2 {
    font-size:1.45rem
  }
  .auth-art .brand {
    padding:5px 8px;
    font-size:.96rem
  }
  .auth-art .mark {
    width:25px;
    height:25px;
    font-size:17px
  }
  .auth-pane {
    align-self:start;
    padding:23px 22px 38px
  }
  .auth-pane .forms {
    margin:18px 0
  }
  .auth-wrap {
    display:block
  }
  .view {
    padding:20px 15px 110px
  }
  .top {
    height:55px;
    padding:0 15px
  }
  .top .brand {
    font-size:1rem
  }
  .top .mark {
    width:29px;
    height:29px;
    font-size:18px
  }
  .top .right {
    gap:6px
  }
  .intro {
    align-items:flex-start;
    margin-bottom:15px
  }
  .grid,.two {
    gap:9px
  }
  .cols {
    grid-template-columns:1fr
  }
  .panel {
    padding:15px
  }
  .tables {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .toolbar {
    gap:8px
  }
  .card,.tile {
    padding:13px
  }
  .hero {
    padding:18px
  }
  dialog {
    margin:auto auto 0;
    width:100%;
    max-height:90svh;
    border-radius:18px 18px 0 0
  }
  .sheet-body {
    padding-bottom:max(22px,env(safe-area-inset-bottom))
  }
  .stat {
    padding:12px 9px
  }
  .stat small {
    font-size:.8rem
  }
  .foot-actions {
    flex-wrap:wrap
  }
}

@media print {
  body {
    background:white
  }
  #app,#dialog,#notice {
    display:none!important
  }
  .print-host {
    display:block!important;
    width:100%;
    padding:0
  }
  .print-host .receipt {
    display:block;
    border:0;
    margin:0 auto;
    width:100%;
    font-size:10.5pt
  }
  .receipt {
    color:#000;
    background:#fff
  }
  dialog::backdrop {
    display:none
  }
}

