/* 仁佰汇配送 · 客户订货页
   版式：手机单栏（桌面居中 520px），深绿店招 + 送货票样式的截单卡片，底部五栏导航。
   配色：菜场深绿做主色，印章红只用于价格和单号，蛋黄色提示截单时间。 */
:root {
  --maxw: 520px; --tabh: 58px; --stick: 0px;
  --frame: #E4E9E3; --bg: #F3F5F1; --surface: #FFFFFF; --sunken: #EDF1EC; --ink: #17201A; --muted: #687269;
  --line: #E2E7E1; --line-strong: #CCD5CC;
  --leaf: #157546; --leaf-ink: #FFFFFF; --leaf-soft: #E1F2E7; --deep: #0E5532; --on-deep: #F2F7F1; --on-deep-muted: #B7D3C1;
  --price: #D2361E; --price-soft: #FCE8E3; --yolk: #F3B53A; --yolk-ink: #3B2A05; --yolk-soft: #FFF3D6;
  --warn: #9A5B08; --warn-soft: #FBEFD9; --blue: #2A55B8; --blue-soft: #E5ECFB; --violet: #6B3EB0; --violet-soft: #EEE7FA;
  --teal: #0C6F7A; --teal-soft: #DCF0F2; --ok: #1B7A4C; --ok-soft: #DFF2E7; --mute-soft: #ECEFEB;
  --slip: #FFFDF7; --slip-line: #D6CEBC; --scrim: rgb(10 18 12 / .48); --shadow-soft: rgb(20 40 25 / .10);
  --shadow: 0 1px 2px rgb(20 40 25 / .06), 0 8px 24px rgb(20 40 25 / .10);
  --art-leaf: #2E8B4E; --art-leaf-2: #5DB36F; --art-vein: #E8F4EA; --art-tomato: #E2462C; --art-carrot: #EE8A2A;
  --art-crate: #C98A4B; --art-crate-2: #A86E35; --art-ink: #FFF3DD;
  --c0b: #E1F2E7; --c0f: #1B7A4C; --c1b: #FBE5E1; --c1f: #C13A26; --c2b: #FFF1D2; --c2f: #A26A06; --c3b: #DCF0F2; --c3f: #0C6F7A;
  --c4b: #E4EEFB; --c4f: #2D60B0; --c5b: #F4ECDD; --c5f: #8A6630; --c6b: #FBEBD6; --c6f: #A55A12; --c7b: #EFE6DF; --c7f: #7A4B34;
  --c8b: #FDE7D8; --c8f: #C2561A; --c9b: #ECE9F4; --c9f: #5C5480;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --num: "DIN Alternate", "Bahnschrift", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --frame: #0A0E0B; --bg: #101512; --surface: #18201B; --sunken: #1F2922; --ink: #E6ECE7; --muted: #9AA59D;
    --line: #26302A; --line-strong: #35413A;
    --leaf: #4CC38A; --leaf-ink: #0D1A12; --leaf-soft: #17321F; --deep: #0C2A1A; --on-deep: #EAF3EC; --on-deep-muted: #9CBDA8;
    --price: #FF7A5C; --price-soft: #3A1F19; --yolk: #F4C15A; --yolk-ink: #2A1E02; --yolk-soft: #33290F;
    --warn: #E4A54C; --warn-soft: #33281A; --blue: #8EA8F5; --blue-soft: #1D2846; --violet: #B69AFF; --violet-soft: #2A2244;
    --teal: #4BC1CD; --teal-soft: #12303A; --ok: #5BC793; --ok-soft: #14302A; --mute-soft: #222A25;
    --slip: #1A211C; --slip-line: #3A463E; --scrim: rgb(0 0 0 / .62); --shadow-soft: rgb(0 0 0 / .35);
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .4);
    --art-vein: #20402A; --art-ink: #2B1A08;
    --c0b: #17321F; --c0f: #6FD39F; --c1b: #3A1F1A; --c1f: #FF8E78; --c2b: #3A2E10; --c2f: #F4C15A; --c3b: #12303A; --c3f: #5FCAD5;
    --c4b: #1A2740; --c4f: #8DB2F2; --c5b: #332A1C; --c5f: #D8B680; --c6b: #3A2914; --c6f: #F0A05A; --c7b: #2F241D; --c7f: #D3A185;
    --c8b: #3B2416; --c8f: #FF9F66; --c9b: #26243A; --c9f: #B6AEE0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --frame: #0A0E0B; --bg: #101512; --surface: #18201B; --sunken: #1F2922; --ink: #E6ECE7; --muted: #9AA59D;
  --line: #26302A; --line-strong: #35413A;
  --leaf: #4CC38A; --leaf-ink: #0D1A12; --leaf-soft: #17321F; --deep: #0C2A1A; --on-deep: #EAF3EC; --on-deep-muted: #9CBDA8;
  --price: #FF7A5C; --price-soft: #3A1F19; --yolk: #F4C15A; --yolk-ink: #2A1E02; --yolk-soft: #33290F;
  --warn: #E4A54C; --warn-soft: #33281A; --blue: #8EA8F5; --blue-soft: #1D2846; --violet: #B69AFF; --violet-soft: #2A2244;
  --teal: #4BC1CD; --teal-soft: #12303A; --ok: #5BC793; --ok-soft: #14302A; --mute-soft: #222A25;
  --slip: #1A211C; --slip-line: #3A463E; --scrim: rgb(0 0 0 / .62); --shadow-soft: rgb(0 0 0 / .35);
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .4);
  --art-vein: #20402A; --art-ink: #2B1A08;
  --c0b: #17321F; --c0f: #6FD39F; --c1b: #3A1F1A; --c1f: #FF8E78; --c2b: #3A2E10; --c2f: #F4C15A; --c3b: #12303A; --c3f: #5FCAD5;
  --c4b: #1A2740; --c4f: #8DB2F2; --c5b: #332A1C; --c5f: #D8B680; --c6b: #3A2914; --c6f: #F0A05A; --c7b: #2F241D; --c7f: #D3A185;
  --c8b: #3B2416; --c8f: #FF9F66; --c9b: #26243A; --c9f: #B6AEE0;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--frame); }
body { margin: 0; background: var(--frame); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.ic { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

.app { max-width: var(--maxw); min-height: 100vh; margin: 0 auto; background: var(--bg); position: relative; box-shadow: 0 0 0 1px var(--line); }
.page { padding-bottom: calc(var(--tabh) + 96px + env(safe-area-inset-bottom, 0px)); min-height: 100vh; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); padding: 24px; text-align: center; }

/* 印章标 */
.seal { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; background: var(--price); color: #fff; font: 900 19px/1 var(--serif); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--price), inset 0 0 0 3.5px #fff; }
.seal.big { width: 64px; height: 64px; font-size: 34px; border-radius: 10px; box-shadow: inset 0 0 0 3px var(--price), inset 0 0 0 5px #fff; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--leaf); border-color: var(--leaf); color: var(--leaf-ink); }
.btn.danger { color: var(--price); border-color: var(--price); background: var(--surface); }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.wide { width: 100%; height: 46px; font-size: 16px; }
.btn.ghost-line { width: calc(100% - 32px); margin: 8px 16px 0; color: var(--muted); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }
.link { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 0; }
.link .ic { width: 15px; height: 15px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 12.5px; padding: 0 16px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 600; line-height: 17px; background: var(--yolk-soft); color: var(--warn); vertical-align: 2px; }
.tag.hot { background: var(--price-soft); color: var(--price); }
.badge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--price); color: #fff; font: 600 11px/17px var(--num); text-align: center; }

/* 底部导航 */
.tabbar { position: fixed; z-index: 30; bottom: 0; left: 50%; translate: -50% 0; width: min(100%, var(--maxw)); display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tab { position: relative; height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.tab[aria-current="page"] { color: var(--leaf); font-weight: 600; }
.tab[aria-current="page"] .ic { stroke-width: 2.1; }

/* 顶部 */
.center-top { position: relative; display: flex; align-items: center; justify-content: center; height: 50px; padding-top: env(safe-area-inset-top, 0px); }
.center-top h1 { font-size: 17px; font-weight: 600; }
.center-top .top-r { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); border: 0; background: none; color: var(--muted); font-size: 14px; }
.sub-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; height: calc(50px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); padding-left: max(4px, env(safe-area-inset-left, 0px)); padding-right: max(4px, env(safe-area-inset-right, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); }
.sub-top h1 { font-size: 17px; font-weight: 600; text-align: center; }
.pad { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
.pad-x { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* 首页 */
.home-top { background: var(--deep); color: var(--on-deep); padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 52px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px;
  background-image: repeating-linear-gradient(90deg, rgb(255 255 255 / .035) 0 18px, transparent 18px 36px); }
.ht-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brandline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brandline b { display: block; font: 900 19px/1.2 var(--serif); letter-spacing: .06em; }
.brandline small { display: block; font-size: 12px; color: var(--on-deep-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--on-deep); gap: 1px; }
.searchbox { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; }
.searchbox .ic { width: 18px; height: 18px; }

.board { position: relative; margin: -40px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); display: flex; align-items: stretch; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  -webkit-mask: radial-gradient(circle 8px at 0 62%, transparent 98%, #000) , radial-gradient(circle 8px at 100% 62%, transparent 98%, #000); -webkit-mask-composite: source-in; mask: radial-gradient(circle 8px at 0 62%, transparent 98%, #000), radial-gradient(circle 8px at 100% 62%, transparent 98%, #000); mask-composite: intersect; }
.board-l { flex: 1; min-width: 0; padding: 14px 0 0 16px; display: flex; flex-direction: column; }
.board-k { font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }
.board-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 2px 0 10px; }
.board-date small { width: 100%; font-size: 12px; color: var(--muted); }
.board-date b { font: 900 34px/1.05 var(--serif); color: var(--leaf); letter-spacing: .02em; }
.board-date span { font-weight: 600; }
.board-cd { margin: auto -200px 0 -16px; padding: 8px 16px; background: var(--yolk-soft); color: var(--warn); font: 600 13px/1.3 var(--num); border-top: 1.5px dashed var(--line-strong); font-variant-numeric: tabular-nums; }
.board-art { width: 132px; flex: none; align-self: center; margin: 6px 6px 34px 0; }
.notice { display: flex; gap: 8px; align-items: flex-start; margin: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); padding: 9px 12px; border-radius: 10px; background: var(--surface); font-size: 13px; }
.notice b { flex: none; color: var(--price); font-weight: 700; }

.cgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 4px; margin: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); padding: 16px 6px 14px; background: var(--surface); border-radius: 14px; }
.cg { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; }
.cg-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 900 20px/1 var(--serif); }
.m0 { background: var(--c0b); color: var(--c0f); } .m1 { background: var(--c1b); color: var(--c1f); } .m2 { background: var(--c2b); color: var(--c2f); }
.m3 { background: var(--c3b); color: var(--c3f); } .m4 { background: var(--c4b); color: var(--c4f); } .m5 { background: var(--c5b); color: var(--c5f); }
.m6 { background: var(--c6b); color: var(--c6f); } .m7 { background: var(--c7b); color: var(--c7f); } .m8 { background: var(--c8b); color: var(--c8f); } .m9 { background: var(--c9b); color: var(--c9f); }

.block { margin-top: 18px; }
.block-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.block-h h2 { font-size: 17px; font-weight: 700; }
.block-h .hl { color: var(--surface); background: var(--leaf); padding: 1px 7px; border-radius: 6px 0 0 6px; margin-right: 1px; }
.block-h .link { color: var(--leaf); font-weight: 600; }
.block-h .link .ic { width: 16px; height: 16px; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); scrollbar-width: none; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 116px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--surface); border-radius: 12px; scroll-snap-align: start; }
.mini .pimg-btn { padding: 0; }
.mini-img { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; display: grid; place-items: center; font: 900 30px/1 var(--serif); }
.mini-n { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-p { font: 600 13px/1.2 var(--num); color: var(--price); min-height: 16px; }
.mini-p em { font: 400 11px var(--sans); color: var(--muted); font-style: normal; }
.mini-add { height: 28px; border-radius: 999px; border: 1px solid var(--leaf); background: transparent; color: var(--leaf); font-size: 12px; font-weight: 600; }
.mini-in { height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); font-size: 12px; font-weight: 600; }
.more { display: block; margin: 12px 16px 0; padding: 12px; text-align: center; color: var(--muted); font-size: 13px; border-radius: 12px; border: 1px dashed var(--line-strong); }

/* 商品行 */
.plist { display: flex; flex-direction: column; gap: 8px; padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.prow { display: flex; gap: 12px; padding: 10px; background: var(--surface); border-radius: 12px; border: 1px solid transparent; }
.prow.in { border-color: var(--leaf-soft); box-shadow: inset 3px 0 0 var(--leaf); }
.pimg-btn { padding: 0; border: 0; background: none; flex: none; border-radius: 10px; }
.pimg { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; font: 900 30px/1 var(--serif); }
img.pimg, img.mini-img, img.cimg, img.qimg { background: var(--sunken); }
.pbody { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pname { font-weight: 600; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.pname small { font-weight: 400; color: var(--muted); font-size: 12px; }
.pspec { font-size: 12.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfoot { margin-top: auto; padding-top: 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.price { color: var(--price); font: 700 19px/1 var(--num); font-variant-numeric: tabular-nums; }
.price small { font-size: 12.5px; }
.price em { font: 400 12px var(--sans); color: var(--muted); font-style: normal; margin-left: 2px; }
.orig { display: block; font: 12px var(--num); color: var(--muted); margin-top: 2px; }
.login-price { color: var(--price); font-size: 14px; font-weight: 600; }
.add { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--leaf); color: var(--leaf-ink); display: grid; place-items: center; flex: none; }
.add .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.stepper { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--leaf); background: var(--surface); color: var(--leaf); display: grid; place-items: center; padding: 0; }
.stepper button:last-child { background: var(--leaf); color: var(--leaf-ink); }
.stepper .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.stepper input { width: 46px; height: 30px; border: 0; background: transparent; text-align: center; font: 600 15px var(--num); }
.stepper input:focus { outline: 2px solid var(--leaf); border-radius: 6px; }

/* 购物车浮条 / 登录提示 */
.cartbar, .nudge { position: fixed; z-index: 25; left: 50%; translate: -50% 0; width: calc(min(100%, var(--maxw)) - 24px); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.app:has(.tabbar) .cartbar, .app:has(.tabbar) .nudge { bottom: calc(var(--tabh) + 8px + env(safe-area-inset-bottom, 0px)); }
.cartbar { display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.cb-ic { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: var(--leaf-ink); flex: none; }
.cb-ic .badge { top: -3px; left: auto; right: -4px; }
.cb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-t b { font: 700 18px/1.1 var(--num); }
.cb-t small { font-size: 11.5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar .btn { height: 42px; }
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--yolk-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); }

/* 分类页 */
.cat-head { position: sticky; top: 0; z-index: 20; background: var(--surface); padding-top: env(safe-area-inset-top, 0px); border-bottom: 1px solid var(--line); }
.cat-head .center-top { height: 44px; padding-top: 0; }
.search-in { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); padding: 0 14px; border-radius: 999px; background: var(--sunken); color: var(--muted); }
.pad .search-in { margin: 0; }
.search-in .ic { width: 18px; height: 18px; }
.search-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); }
.catbar { display: flex; gap: 2px; overflow-x: auto; padding: 10px max(8px, env(safe-area-inset-right, 0px)) 8px max(8px, env(safe-area-inset-left, 0px)); scrollbar-width: none; }
.catbar::-webkit-scrollbar { display: none; }
.cb { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; }
.cb .cg-ic { width: 42px; height: 42px; font-size: 18px; box-shadow: 0 0 0 2px transparent; }
.cb[aria-current="true"] .cg-ic { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--leaf); }
.cb-n { font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.cb[aria-current="true"] .cb-n { background: var(--leaf); color: var(--leaf-ink); font-weight: 600; }
.catwrap { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; }
.catwrap.noRail { grid-template-columns: minmax(0, 1fr); }
.rail { position: sticky; top: var(--stick); min-height: calc(100vh - var(--stick) - var(--tabh)); max-height: calc(100vh - var(--stick) - var(--tabh) - 80px); overflow-y: auto; background: var(--sunken); padding-bottom: 20px; display: flex; flex-direction: column; scrollbar-width: none; }
.rail button { position: relative; text-align: left; border: 0; background: transparent; padding: 14px 8px 14px 14px; font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.rail button i { font: 11px var(--num); font-style: normal; opacity: .7; }
.rail button[aria-current="true"] { background: var(--bg); color: var(--ink); font-weight: 700; }
.rail button[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--leaf); }
.cat-list { min-width: 0; padding-top: 4px; }
.cat-list .plist { padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 10px; }
.catwrap.noRail .cat-list .plist { padding-left: max(12px, env(safe-area-inset-left, 0px)); }
.cat-list .pimg { width: 68px; height: 68px; }
.sortbar { display: flex; align-items: center; gap: 4px; padding: 6px 12px 8px; font-size: 13px; color: var(--muted); }
.sortbar button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.sortbar button[aria-pressed="true"] { color: var(--leaf); font-weight: 600; background: var(--leaf-soft); }
.sortbar span { margin-left: auto; }
.endline { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 4px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 36px; padding: 5px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 600; line-height: 1.25; }
.chip small { font-size: 11px; font-weight: 400; color: var(--muted); }
.chip.on { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.chip.on small { color: var(--leaf); }
.date-other { position: relative; cursor: pointer; }
.date-other input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.mini-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 0 10px; }

/* 卡片 / 表单区块 */
.card { display: block; margin: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); padding: 14px; background: var(--surface); border-radius: 14px; }
.card-h { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: baseline; gap: 6px; }
.card-h small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.card-h.row { justify-content: space-between; align-items: center; }
.card-h h2 { font-size: 15px; font-weight: 700; }
.addr { display: flex; align-items: center; gap: 12px; }
.addr > div { flex: 1; min-width: 0; }
.addr b { display: block; font-weight: 700; }
.addr b span { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.addr small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.addr > .ic:first-child { color: var(--leaf); }
.addr > .ic:last-child { color: var(--muted); width: 18px; }
.slots { margin-top: 10px; }
.hint { margin-top: 10px; font-size: 12.5px; color: var(--warn); font-variant-numeric: tabular-nums; }
.cline { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cline:first-of-type { border-top: 0; padding-top: 0; }
.cimg { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; font: 900 22px/1 var(--serif); flex: none; }
.cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cmeta { font-size: 12.5px; color: var(--muted); }
.cfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.cfoot b { font: 700 15px var(--num); }
textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); resize: vertical; font-size: 16px; }
textarea:focus, .fld input:focus { outline: 2px solid var(--leaf); outline-offset: -1px; border-color: var(--leaf); }
.minbar { margin: 12px 16px 0; font-size: 13px; color: var(--warn); }
.minbar b { font-family: var(--num); }
.bar { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--yolk); border-radius: inherit; }
.cart .fine { margin-top: 12px; }
.submitbar { position: fixed; z-index: 26; left: 50%; translate: -50% 0; width: min(100%, var(--maxw)); bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); }
.app:has(.tabbar) .submitbar { bottom: calc(var(--tabh) + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
.sb-t { display: flex; flex-direction: column; }
.sb-t small { font-size: 12px; color: var(--muted); }
.sb-t b { font: 700 22px/1.1 var(--num); color: var(--price); }
.sb-acts { display: flex; gap: 8px; }
.submitbar .btn { height: 44px; padding: 0 26px; }

/* 快捷下单 */
.quick-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); font-size: 13px; color: var(--muted); }
.quick-tools b { color: var(--ink); }
.qlist { margin: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); background: var(--surface); border-radius: 14px; overflow: hidden; }
.qrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); cursor: text; }
.qrow:first-child { border-top: 0; }
.qrow.in { background: var(--leaf-soft); }
.qimg { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; font: 900 19px/1 var(--serif); flex: none; }
.qmain { flex: 1; min-width: 0; }
.qmeta { font-size: 12px; color: var(--muted); }
.qin { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.qin input { width: 72px; height: 38px; border: 1.5px solid var(--line-strong); border-radius: 8px; text-align: center; background: var(--surface); font: 600 16px var(--num); }
.qin input:focus { outline: none; border-color: var(--leaf); }
.qin em { font-style: normal; font-size: 12.5px; color: var(--muted); width: 22px; }

/* 未登录 / 空状态 */
.gate { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 30px 32px 10px; }
.gate.small { padding-top: 40px; }
.gate h2 { font-size: 17px; font-weight: 700; margin-top: 4px; }
.gate p { color: var(--muted); font-size: 14px; max-width: 26em; }
.gate .btn.wide { max-width: 300px; margin-top: 8px; }
.gate-acts { display: flex; gap: 10px; margin-top: 8px; }
.illo { width: 200px; height: 140px; }
.big-ic { width: 56px; height: 56px; color: var(--line-strong); stroke-width: 1.3; }
.big-ic.ok { color: var(--ok); }

/* 我的 */
.me-top { background: linear-gradient(160deg, var(--deep), var(--leaf)); color: var(--on-deep); padding-bottom: 26px; margin-bottom: -14px; }
.on-band h1 { color: var(--on-deep); }
.me-head { display: flex; align-items: center; gap: 12px; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); }
.avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--leaf); font: 900 26px/1 var(--serif); flex: none; box-shadow: 0 0 0 3px rgb(255 255 255 / .25); }
.avatar.ghost .ic { width: 30px; height: 30px; }
.me-n { flex: 1; min-width: 0; }
.me-n b { display: block; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-n small { color: var(--on-deep-muted); font-size: 12.5px; }
.me-set { display: inline-flex; align-items: center; font-size: 12.5px; color: var(--on-deep-muted); }
.me-set .ic { width: 15px; height: 15px; }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 8px; }
.me-stats a { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.me-stats b { font: 700 18px/1.2 var(--num); }
.me-stats span { font-size: 12px; color: var(--on-deep-muted); }
.me .card { position: relative; }
.icon-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.icon-row a, .icon-row button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; font-size: 12.5px; border: 0; background: none; color: var(--ink); }
.icon-row .ic { width: 26px; height: 26px; color: var(--leaf); stroke-width: 1.6; }
.icon-row .badge { left: calc(50% + 8px); top: 0; }
.foot-brand { text-align: center; color: var(--muted); font-size: 12px; padding: 22px 0 0; }

/* 订单 */
.tabs { position: sticky; top: calc(50px + env(safe-area-inset-top, 0px)); z-index: 15; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: 1 0 auto; text-align: center; padding: 11px 12px; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; }
.tabs a[aria-current="true"] { color: var(--leaf); border-bottom-color: var(--leaf); font-weight: 700; }
.olist { display: flex; flex-direction: column; gap: 10px; padding: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.ocard { background: var(--surface); border-radius: 14px; overflow: hidden; }
.ocard-link { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 8px; }
.oc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ono { font: 600 13.5px var(--num); color: var(--price); letter-spacing: .02em; }
.ono.big { font-size: 20px; }
.oc-d { font-size: 13px; color: var(--muted); }
.oc-items { font-size: 14px; overflow-wrap: anywhere; }
.oc-f { display: flex; justify-content: space-between; align-items: center; }
.oc-f b { font: 700 17px var(--num); }
.paid { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11.5px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.paid.ok { background: var(--ok-soft); color: var(--ok); }
.oc-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 12px; }
.ostatus { margin: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); padding: 16px; border-radius: 14px; background: linear-gradient(150deg, var(--deep), var(--leaf)); color: var(--on-deep); }
.ostatus.cancelled { background: var(--mute-soft); color: var(--muted); }
.ostatus b { font-size: 19px; }
.ostatus p { color: var(--on-deep-muted); font-size: 13px; margin-top: 2px; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.steps li { position: relative; padding-top: 12px; font-size: 11.5px; text-align: center; color: var(--on-deep-muted); }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 999px; background: rgb(255 255 255 / .22); }
.steps li.on { color: var(--on-deep); font-weight: 600; }
.steps li.on::before { background: var(--yolk); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.kv div { min-width: 0; display: flex; flex-direction: column; }
.kv span { font-size: 12px; color: var(--muted); }
.kv b { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.kv .wide { grid-column: 1 / -1; }
.oline { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.oline:first-of-type { border-top: 0; }
.oline > b { font: 600 15px var(--num); white-space: nowrap; }
.oline.total { font-weight: 700; }
.oline.total > b { color: var(--price); font-size: 18px; }
.link-row:active { background: var(--sunken); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.timeline li { display: flex; gap: 12px; }
.timeline time { color: var(--muted); font: 12.5px var(--num); width: 84px; flex: none; padding-top: 1px; }

/* 对账单 */
.debt { margin: 12px max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); padding: 18px 16px; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; border-left: 0; }
.debt span { font-size: 13px; color: var(--muted); }
.debt b { font: 700 32px/1.15 var(--num); color: var(--price); }
.debt small { font-size: 12.5px; color: var(--muted); }
.mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mtable th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mtable td { padding: 9px 4px; border-bottom: 1px solid var(--line); font-family: var(--num); }
.mtable tr:last-child td { border-bottom: 0; }
.mtable .warn { color: var(--warn); font-weight: 600; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 14px; padding: 18px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px)); }
.form-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0 8px; text-align: center; }
.form-brand .seal { width: 54px; height: 54px; font-size: 29px; border-radius: 10px; }
.form-brand b { font: 900 22px/1.2 var(--serif); letter-spacing: .06em; }
.form-brand small { color: var(--muted); }
.lead { color: var(--muted); font-size: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-size: 13px; color: var(--muted); font-weight: 600; }
.fld input { height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 16px; width: 100%; }
.ro { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); font-size: 14px; }
.ro span { color: var(--muted); }
.err { padding: 10px 12px; border-radius: 10px; background: var(--price-soft); color: var(--price); font-size: 13.5px; }
.form-alt { text-align: center; color: var(--muted); font-size: 14px; }
.form-alt a, .fine a { color: var(--leaf); font-weight: 600; }
.form .fine { padding: 0; text-align: center; }
.prose { line-height: 1.8; display: flex; flex-direction: column; gap: 10px; }

/* 弹层 */
.sheet, .modal { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet-panel { position: absolute; left: 50%; translate: -50% 0; bottom: 0; width: min(100%, var(--maxw)); max-height: 86vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: up .2s ease-out; }
.sheet-panel.tall { max-height: 94vh; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet-x { position: absolute; right: 8px; top: 8px; z-index: 2; background: var(--surface); }
.sheet-body { overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.pd { display: flex; flex-direction: column; gap: 8px; }
.pd-img { width: 100%; aspect-ratio: 4 / 3; max-height: 46vh; object-fit: cover; border-radius: 12px; display: grid; place-items: center; font: 900 80px/1 var(--serif); }
.pd h2 { font-size: 20px; font-weight: 700; margin-top: 4px; }
.pd-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.pd .price { font-size: 26px; }
.sheet-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal { display: grid; place-items: center; padding: 24px; }
.modal-card { position: relative; width: min(340px, 100%); background: var(--surface); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.modal-card h2 { font-size: 17px; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.toast { position: fixed; z-index: 70; left: 50%; translate: -50% 0; top: calc(16px + env(safe-area-inset-top, 0px)); max-width: min(90vw, 420px); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); text-align: center; }
.toast.bad { background: var(--price); color: #fff; }

/* 状态标签 */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-warn { background: var(--warn-soft); color: var(--warn); } .p-blue { background: var(--blue-soft); color: var(--blue); } .p-violet { background: var(--violet-soft); color: var(--violet); }
.p-teal { background: var(--teal-soft); color: var(--teal); } .p-ok { background: var(--ok-soft); color: var(--ok); } .p-mute { background: var(--mute-soft); color: var(--muted); }

/* 送货单 */
.slip { position: relative; background: var(--slip); border: 1px solid var(--slip-line); border-radius: 4px; padding: 16px 24px 14px 14px; font-size: 13px; overflow: hidden; }
.slip-h { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 10px; }
.slip-brand { display: none; }
.slip-h h3 { font: 900 20px/1.2 var(--serif); letter-spacing: .5em; }
.slip-no { text-align: right; font: 12px var(--num); color: var(--price); }
.slip-no b { font-size: 14px; }
.slip-meta { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0 0 10px; }
.slip-meta div { display: flex; gap: 6px; }
.slip-meta dt { color: var(--muted); flex: none; }
.slip-meta dd { margin: 0; overflow-wrap: anywhere; }
.slip-tw { overflow-x: auto; }
.slip-t { width: 100%; border-collapse: collapse; min-width: 440px; }
.slip-t th, .slip-t td { border: 1px solid var(--slip-line); padding: 5px 6px; }
.slip-t th { font-weight: 500; font-size: 12px; color: var(--muted); }
.slip-t td.r { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; }
.slip-t td.c { text-align: center; }
.slip-sign { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 12px; color: var(--muted); }
.slip-ply { position: absolute; right: 5px; top: 50%; translate: 0 -50%; writing-mode: vertical-rl; font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.stamp { position: absolute; right: 36px; bottom: 44px; width: 84px; height: 84px; border: 3px double var(--price); border-radius: 50%; color: var(--price); display: grid; place-items: center; text-align: center; transform: rotate(-14deg); font: 900 16px/1.15 var(--serif); opacity: .85; pointer-events: none; }
.stamp small { display: block; font: 600 9px var(--num); }

/* 打印 */
#print-root { display: none; }
@media print {
  :root:root:root { --slip: #fff; --slip-line: #999; --ink: #000; --muted: #444; --price: #c4302a; }
  body.printing .app, body.printing .sheet, body.printing .modal, body.printing .toast { display: none !important; }
  body.printing { background: #fff; }
  body.printing #print-root { display: block; }
  .sheet-print { page-break-after: always; padding: 10mm 0; }
  .slip { border: 0; }
  .slip-brand { display: block; font: 900 14px var(--serif); }
  .slip-h { grid-template-columns: 1fr auto 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sheet-panel { animation: none; } }
@media (min-width: 560px) { .app { box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgb(0 0 0 / .06); } }
@media (max-width: 480px) {
  .slip { padding: 14px 22px 12px 10px; }
  .slip-t { min-width: 0; font-size: 12px; }
  .slip-t th, .slip-t td { padding: 4px 3px; }
  .slip-t small { display: block; }
}
/* 分类图标：照片 */
.cg-ic.photo { background: var(--sunken); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.cg-ic.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cgrid .cg-ic { width: 52px; height: 52px; }
.cb[aria-current="true"] .cg-ic.photo { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--leaf); }
