/*
  每种材料只代表一件事：
  木板 = 放货的地方；粉色单据 = 和钱有关的记录；荧光纸 = 店家对你说的话；卷闸门 = 打烊或到不了的地方。
  红色只用在真正提交订单或确认收款的那一步。
*/
:root {
  --wall: #CFE7DB;
  --wall-shade: #B2D5C5;
  --shutter: #0D4A41;
  --shutter-deep: #0A3932;
  --sign-paint: #FFF0A8;
  --red: #BE1230;
  --red-deep: #960C25;
  --ink: #13231E;
  --ink-soft: #3E564F;
  --fluoro: #FFE600;
  --fluoro-pink: #FF6DB0;
  --sold-out: #C5D2CC;
  --enamel: #F7FBF9;
  --bill: #FDE7E5;
  --bill-rule: #A3B9DE;
  --wood: #74461F;
  --wood-lit: #AD7743;

  --display: "ZCOOL QingKe HuangYou", "Microsoft YaHei", "PingFang SC", sans-serif;
  --marker: "Caveat Brush", "Comic Sans MS", cursive;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;

  --t-sm: 14px;
  --t-md: 16px;
  --t-lg: 20px;
  --t-xl: 28px;
  --t-2xl: clamp(36px, 5vw, 48px);

  --gutter: clamp(16px, 4vw, 40px);
  --page: 1200px;
  --page-full: calc(var(--page) + 2 * var(--gutter));
  --cell: 10px;

  --slats:
    linear-gradient(90deg, rgb(0 0 0 / .18), transparent 12%, transparent 88%, rgb(0 0 0 / .18)),
    repeating-linear-gradient(180deg, #8FA39C 0 20px, #A9BBB4 20px 24px, #6E837C 24px 26px);
  --holes-top: radial-gradient(circle at 10px 0, #0000 6px, #000 6.5px) 0 0 / 20px 100% repeat-x;
  --holes-left: radial-gradient(circle at 0 10px, #0000 6px, #000 6.5px) 0 0 / 100% 20px repeat-y;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--wall);
  color: var(--ink);
  font: 400 var(--t-md)/1.7 var(--body);
}

h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
h2 { font-size: var(--t-lg); line-height: 1.4; }
h3 { font-size: var(--t-md); line-height: 1.4; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
main { flex: 1; outline: none; overflow-x: clip; }
small { font-size: var(--t-sm); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus, var(--red)); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  padding: 8px 14px; background: var(--enamel);
}
.skip:focus { top: 8px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* 卷闸门：第一次打开网站时升起，升起之前也是加载画面 */
.shutter { display: none; }

.shop-closed .shutter {
  display: grid;
  place-items: center;
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
  background: var(--slats);
  border-bottom: 14px solid var(--ink);
  animation: shutter-failsafe .75s 3s cubic-bezier(.65, 0, .35, 1) forwards;
}
.shop-opening .shutter { animation: shutter-up .75s .35s cubic-bezier(.65, 0, .35, 1) forwards; }

.shutter span {
  font: 400 clamp(72px, 17vw, 240px)/1 var(--display);
  letter-spacing: .04em;
  color: var(--shutter);
  mix-blend-mode: multiply;
}

/* 两个名字不能合并：换名字动画才会从头开始，只改延迟会中途跳帧 */
@keyframes shutter-up { to { transform: translateY(-101%); } }
@keyframes shutter-failsafe { to { transform: translateY(-101%); } }

/* 404 也是一扇拉下来的门 */
.closed {
  min-height: min(68vh, 640px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 48px var(--gutter);
  text-align: center;
  background: var(--slats);
  border-bottom: 14px solid var(--ink);
}
.closed h1 {
  font: 400 clamp(44px, 9vw, 96px)/1.1 var(--display);
  color: var(--shutter);
  mix-blend-mode: multiply;
}

main:has(> .closed) { display: grid; }
main:has(> .closed) + .foot { margin-top: 0; }

/* 招牌 */
.sign {
  background: var(--shutter);
  padding: clamp(10px, 1.6vw, 18px) var(--gutter);
}

.sign-board {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 40px;
  flex-wrap: wrap;
  padding: clamp(10px, 1.6vw, 20px) clamp(14px, 2.4vw, 32px);
  border: 2px solid var(--sign-paint);
  box-shadow: inset 0 0 0 5px var(--shutter), inset 0 0 0 6px var(--sign-paint);
}

.sign-name {
  font: 400 clamp(60px, 13vw, 148px)/1 var(--display);
  letter-spacing: .04em;
  color: var(--sign-paint);
  text-shadow: .035em .035em 0 var(--red), .07em .07em 0 var(--shutter-deep);
}

/* 限宽：英文介绍比中文长很多，让它在右边折成两行，不要把整块挤到店名下面 */
.sign-side { color: var(--sign-paint); text-align: right; max-width: 22em; }
.sign-latin { font: 400 clamp(24px, 3.4vw, 40px)/1.1 var(--marker); }
.sign-tagline { font-size: var(--t-md); line-height: 1.4; margin-top: 4px; opacity: .92; }

/* 导航 */
.bar {
  --focus: var(--fluoro);
  position: sticky; top: 0; z-index: 20;
  background: var(--shutter-deep);
  color: var(--enamel);
}

.bar-in {
  max-width: var(--page-full);
  margin: 0 auto;
  padding: 8px var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px 18px;
}

.bar a { text-decoration: none; }

.bar-name {
  font: 400 var(--t-xl)/1 var(--display);
  color: var(--sign-paint);
  white-space: nowrap;
}
#sign:not(:empty) ~ .bar .bar-name { display: none; }

.aisles {
  display: flex; gap: 2px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.aisles a {
  padding: 6px 12px;
  white-space: nowrap;
}
.aisles a:hover { box-shadow: inset 0 -3px 0 rgb(255 255 255 / .4); }
.aisles a[aria-current] { color: var(--fluoro); font-weight: 700; box-shadow: inset 0 -3px 0 var(--fluoro); }

.search {
  --focus: var(--red);
  flex: 1 1 180px;
  max-width: 320px;
  margin-left: auto;
  display: flex;
  background: var(--enamel);
  border-radius: 3px;
  color: var(--ink);
}
.search input {
  flex: 1; min-width: 0;
  padding: 7px 10px;
  border: 0; background: none;
}
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--fluoro); }
.search button {
  display: grid; place-items: center;
  width: 40px;
  border: 0; background: none; cursor: pointer;
}

.bar-links { display: flex; gap: 14px; white-space: nowrap; }
.bar-links a:hover { text-decoration: underline; }
.bar-links { align-items: center; }
.lang-btn {
  padding: 3px 8px;
  border: 1px solid rgb(255 255 255 / .55);
  border-radius: 3px;
  background: none;
  color: inherit;
  font-weight: 700;
  font-size: var(--t-sm);
  line-height: 1.3;
  cursor: pointer;
}
.lang-btn:hover { background: rgb(255 255 255 / .12); border-color: var(--enamel); }

.bar-cart {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 6px 12px;
  border: 0; border-radius: 3px;
  background: var(--fluoro); color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.bar-cart:hover { background: #FFF263; }

.badge {
  min-width: 22px; height: 22px;
  padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--red); color: #fff;
  font-size: var(--t-sm); line-height: 1;
}
.badge.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.45); } }

/* 货架 */
.aisle { padding-top: clamp(20px, 3vw, 36px); }

.aisle-name {
  max-width: var(--page-full);
  margin: 0 auto;
  padding: 0 calc(var(--gutter) + var(--cell));
  font: 400 var(--t-2xl)/1.1 var(--display);
  color: var(--shutter);
}

.shelf {
  max-width: var(--page-full);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.goods {
  display: flex;
  flex-direction: column;
  padding: 0 var(--cell) 34px;
}

.goods-stage {
  position: relative;
  height: 226px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.goods-stage img {
  height: 196px;
  width: 100%;
  object-fit: contain;
  object-position: bottom;
}
.goods-stage:hover ~ .goods-label h3 a { text-decoration: underline; }

/* 木板从每格向两边延伸，一排缺货位时也是一整条 */
.plank {
  position: relative;
  height: 14px;
}
.plank::after {
  content: "";
  position: absolute;
  top: 0; left: -100vw;
  width: 300vw; height: 14px;
  background: linear-gradient(var(--wood-lit) 0 5px, var(--wood) 5px);
  box-shadow: 0 7px 0 var(--wall-shade);
}
.goods .plank { margin: 0 calc(-1 * var(--cell)) 14px; }

.goods-label { flex: 1; }
.goods-label h3 { font-weight: 700; }
.goods-label h3 a { text-decoration: none; }
.goods-label h3 a:hover { text-decoration: underline; }
.goods-spec { color: var(--ink-soft); font-size: var(--t-sm); }

.stock { font-size: var(--t-sm); font-weight: 700; }
.stock.low { color: var(--red-deep); }
.stock.out { color: var(--ink-soft); }

.goods-act {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

/* 价牌：店里用荧光纸手写的星形价牌，货架上最响的东西 */
.tag {
  position: absolute;
  top: 2px; right: 2%;
  width: 96px; height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--fluoro);
  color: var(--ink);
  font-family: var(--marker);
  line-height: .95;
  transform: rotate(-8deg);
  clip-path: polygon(50% 0%, 59.1% 10%, 71.7% 5%, 75.6% 17.9%, 89.1% 18.8%, 86.9% 32.2%, 98.7% 38.9%, 91% 50%, 98.7% 61.1%, 86.9% 67.8%, 89.1% 81.2%, 75.6% 82.1%, 71.7% 95%, 59.1% 90%, 50% 100%, 40.9% 90%, 28.3% 95%, 24.4% 82.1%, 10.9% 81.2%, 13.1% 67.8%, 1.3% 61.1%, 9% 50%, 1.3% 38.9%, 13.1% 32.2%, 10.9% 18.8%, 24.4% 17.9%, 28.3% 5%, 40.9% 10%);
}
.tag.low { background: var(--fluoro-pink); }
.tag.out { background: var(--sold-out); }
.tag-rm { font-size: 15px; }
.tag-num { font-size: 34px; }
.tag-num.long { font-size: 27px; }
.tag-num sup { font-size: .5em; vertical-align: .55em; line-height: 0; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--shutter);
  border-radius: 3px;
  background: var(--shutter); color: var(--enamel);
  font-weight: 700; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--shutter-deep); border-color: var(--shutter-deep); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--sold-out); border-color: var(--sold-out); color: var(--ink-soft); cursor: not-allowed; transform: none; }

.btn-commit { background: var(--red); border-color: var(--red); color: #fff; }
.btn-commit:hover { background: var(--red-deep); border-color: var(--red-deep); }

.btn-cart, .btn-quiet { background: transparent; color: var(--shutter); }
.btn-cart:hover, .btn-quiet:hover { background: var(--shutter); color: var(--enamel); }
/* 写在 :hover 后面，不能点的按钮鼠标放上去也不会变成白字 */
.btn-cart:disabled, .btn-quiet:disabled { background: transparent; color: var(--ink-soft); }

.goods-act .btn { padding-inline: 6px; white-space: nowrap; }
.btn-wide { width: 100%; }

.link-btn {
  padding: 0; border: 0; background: none;
  color: var(--ink-soft); font-size: var(--t-sm);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }
.link-btn.danger { color: var(--red-deep); }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; background: none; cursor: pointer;
}

/* 空货架上的荧光告示 */
.notice {
  display: grid;
  justify-items: center;
  padding: clamp(40px, 8vw, 88px) var(--gutter) 56px;
}
.notice-card {
  max-width: 30em;
  padding: 20px 28px;
  background: var(--fluoro);
}
.notice-card h1 { font: 400 var(--t-2xl)/1.15 var(--display); }
.notice-card p { margin-top: 6px; }
.notice .plank { width: 100%; }
.notice-act { margin-top: 30px; }

/* 商品详情 */
.detail {
  max-width: var(--page-full);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.detail-photo { position: relative; padding-top: 24px; }
.detail-photo img {
  height: clamp(280px, 38vw, 430px);
  width: 100%;
  object-fit: contain;
  object-position: bottom;
}
.detail-photo .tag { width: 132px; height: 132px; top: 0; right: 6%; }
.detail-photo .tag-rm { font-size: 20px; }
.detail-photo .tag-num { font-size: 46px; }
.detail-photo .tag-num.long { font-size: 38px; }
/* 这块板从左边的墙伸出来，在商品右边收住，不穿过文字 */
.detail-stage .plank::after { width: calc(100vw + 100%); }

.detail-info h1 { font: 400 var(--t-2xl)/1.15 var(--display); color: var(--shutter); }
.detail-spec { color: var(--ink-soft); margin-top: 6px; }
.detail-desc { margin-top: 18px; max-width: 34em; }
.detail-qty { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.detail-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; margin-top: 20px; }

.crumbs { font-size: var(--t-sm); color: var(--ink-soft); margin-bottom: 6px; }

.stepper { display: inline-flex; align-items: center; }
.stepper button {
  width: 36px; height: 36px;
  border: 2px solid var(--shutter); background: var(--enamel);
  font-size: 18px; line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--wall); }
.stepper output { min-width: 40px; text-align: center; font-weight: 700; }

/* 单据：购物车、结账和订单都用这张粉色复写纸，孔是真的挖空 */
.bill {
  background: var(--bill);
  padding: 22px 20px 20px;
  -webkit-mask: var(--holes-top);
  mask: var(--holes-top);
}
.bill h2 { font: 400 var(--t-xl)/1.2 var(--display); color: var(--red-deep); }

.bill-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bill-rule);
}
.bill-line img { width: 56px; height: 66px; object-fit: contain; object-position: bottom; }
.bill-line.compact { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 8px 0; align-items: center; }
.bill-line.compact img { width: 40px; height: 46px; }
.bill-what { min-width: 0; }
.bill-what a { font-weight: 700; text-decoration: none; }
.bill-what a:hover { text-decoration: underline; }
.bill-what small { display: block; color: var(--ink-soft); }
.bill-what .warn { color: var(--red-deep); font-weight: 700; }
.bill-what .stepper { margin-top: 6px; }
.bill-sum { text-align: right; white-space: nowrap; }
.bill-sum .link-btn { display: block; margin: 6px 0 0 auto; }

.bill-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.bill-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 8px; padding-top: 8px;
  border-top: 3px double var(--ink);
  font-weight: 700;
}
.bill-total b { font: 400 34px/1 var(--marker); color: var(--red-deep); }

/* 购物车抽屉：从右边抽出来，所以撕孔在左边 */
.cart {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: none;
  height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: none;
  color: var(--ink);
}
.cart::backdrop { background: rgb(10 57 50 / .55); }
.cart[open] { animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }

.cart-bill {
  height: 100%;
  display: flex; flex-direction: column;
  padding: 14px 20px 0 26px;
  -webkit-mask: var(--holes-left);
  mask: var(--holes-left);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; }
.cart-bill .bill-lines { flex: 1; overflow-y: auto; }
.cart-foot { padding: 4px 0 18px; }
.cart-foot .hint { margin: 6px 0 12px; }
.cart-empty { flex: 1; display: grid; align-content: center; justify-items: center; gap: 14px; }

/* 普通页面 */
.page {
  width: 100%;
  max-width: var(--page-full);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) var(--gutter) 56px;
}
.page.narrow { max-width: calc(480px + 2 * var(--gutter)); }
.page h1 { font: 400 var(--t-2xl)/1.15 var(--display); color: var(--shutter); margin-bottom: 18px; }
.hint { color: var(--ink-soft); font-size: var(--t-sm); }

/* 表单 */
.field { display: block; margin-bottom: 14px; }
.field > span, .field-label { display: block; font-size: var(--t-sm); font-weight: 700; margin-bottom: 4px; }
.field small { display: block; color: var(--ink-soft); margin-top: 3px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 11px;
  min-height: 44px;
  border: 2px solid var(--shutter);
  border-radius: 3px;
  background: var(--enamel);
}
.field input:disabled { background: var(--wall-shade); border-color: var(--wall-shade); color: var(--ink-soft); }
.field textarea { resize: vertical; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field-row.three { grid-template-columns: 1fr 1.4fr 1.4fr; }

legend { font: 400 var(--t-xl)/1.2 var(--display); color: var(--shutter); padding: 0; margin-bottom: 10px; }
fieldset { margin-bottom: 18px; }

.form-error { color: var(--red-deep); font-weight: 700; min-height: 1.7em; margin-bottom: 6px; }

/* 验证码：输入格和获取按钮并排，按钮倒计时时宽度不跳 */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; min-width: 0; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.code-row .btn { flex: none; min-width: 8.5em; padding-inline: 12px; }
.field small.code-bad { color: var(--red-deep); font-weight: 700; }

.phone-now { margin-bottom: 8px; }

.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--shutter); }

.account-links { display: none; gap: 8px; margin-bottom: 20px; }

.page form + form { margin-top: 30px; padding-top: 22px; border-top: 2px solid var(--wall-shade); }
.page form + form h2 { margin-bottom: 12px; }

/* 登录注册：人还站在店里，右边是一段货架 */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
}
.auth h1 { margin-bottom: 8px; }
.auth form { margin-top: 12px; }
.auth-switch { margin-top: 16px; }
.auth-switch + .auth-switch { margin-top: 6px; }

.auth-peek-goods {
  height: 250px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.auth-peek-goods img {
  height: 220px;
  width: 30%;
  object-fit: contain;
  object-position: bottom;
}
.auth-peek .plank::after { left: 0; }
.auth-peek-caption { margin-top: 24px; color: var(--ink-soft); }

/* 结账 */
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}
.checkout-bill { position: sticky; top: 72px; }
.checkout-bill h2 { margin-bottom: 4px; }
.checkout-bill .form-error { margin-top: 12px; }
.pay-way { background: var(--fluoro); padding: 12px 16px; }

/* 订单 */
.order-list { display: grid; gap: 10px; }
.order-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px 12px 24px;
  background: var(--bill);
  text-decoration: none;
  -webkit-mask: var(--holes-left);
  mask: var(--holes-left);
}
.order-list a:focus-visible { outline-offset: -6px; }
.order-list a:hover b { text-decoration: underline; }
.order-thumbs { display: flex; gap: 2px; }
.order-thumbs img { width: 38px; height: 46px; object-fit: contain; object-position: bottom; }
.order-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-list small { display: block; color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.order-list-end { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.order-list-end span:first-child { font: 400 26px/1 var(--marker); color: var(--red-deep); }

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: var(--t-sm); font-weight: 700; line-height: 1.5;
  background: var(--wall-shade); color: var(--ink);
  white-space: nowrap;
}
.chip-pending_payment { background: var(--fluoro); }
.chip-paid { background: var(--shutter); color: var(--enamel); }
.chip-shipped { background: #1F4E9C; color: #fff; }
.chip-cancelled { background: var(--sold-out); color: var(--ink-soft); }
.chip-claimed { background: var(--fluoro-pink); }

.steps { display: flex; margin-bottom: 24px; max-width: 640px; counter-reset: step; }
.steps li {
  flex: 1;
  position: relative;
  padding-top: 34px;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--ink-soft);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 50%; z-index: 1;
  width: 28px; height: 28px; margin-left: -14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--enamel);
  border: 2px solid var(--wall-shade);
  font-weight: 700;
}
.steps li + li::after {
  content: "";
  position: absolute; top: 12px; left: -50%; width: 100%; height: 4px;
  background: var(--wall-shade);
}
.steps li.done, .steps li.now { color: var(--ink); font-weight: 700; }
.steps li.done::before { background: var(--shutter); border-color: var(--shutter); color: var(--enamel); }
.steps li.now::before { background: var(--fluoro); border-color: var(--ink); }
.steps li.done + li::after { background: var(--shutter); }

.cancelled-note { margin-bottom: 20px; font-weight: 700; color: var(--ink-soft); }

.order-cols {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}
.order-cols .bill .hint { margin: 10px 0; }

.pay-box { background: var(--fluoro); padding: 18px 20px; margin-bottom: 18px; }
.pay-box h2 { font: 400 34px/1.1 var(--display); margin-bottom: 8px; }
.pay-note { white-space: pre-line; background: var(--enamel); padding: 10px 12px; margin-bottom: 10px; }
.pay-box .hint { color: var(--ink); margin-bottom: 12px; }
.pay-box .form-error { min-height: 0; }
.claimed { font-weight: 700; }

.ship-box { margin-bottom: 18px; }
.ship-box h2 { margin-bottom: 4px; }

/* 后台：干活的地方，不用货架那套装饰 */
.admin-tabs { display: flex; gap: 4px; border-bottom: 3px solid var(--shutter); margin-bottom: 18px; }
.admin-tabs a { padding: 8px 16px; text-decoration: none; font-weight: 700; border-radius: 3px 3px 0 0; }
.admin-tabs a[aria-current] { background: var(--shutter); color: var(--enamel); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filters a { padding: 4px 12px; border-radius: 3px; background: var(--enamel); text-decoration: none; font-size: var(--t-sm); }
.filters a[aria-current] { background: var(--ink); color: var(--enamel); }

.admin-orders li { background: var(--enamel); margin-bottom: 6px; }
.admin-orders summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
  padding: 10px 14px;
  cursor: pointer;
}
.order-no { font-weight: 700; font-variant-numeric: tabular-nums; }
.dim { color: var(--ink-soft); font-size: var(--t-sm); }
.admin-order-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px;
  padding: 6px 14px 16px;
  border-top: 1px solid var(--wall);
}
.admin-order-body h3 { margin: 8px 0 2px; }
.admin-order-act { grid-column: 1 / -1; }
.act-row { display: flex; flex-wrap: wrap; gap: 8px; }
.empty-line { color: var(--ink-soft); padding: 18px 0; }

.table-wrap { overflow-x: auto; background: var(--enamel); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: var(--t-sm); color: var(--ink-soft); padding: 8px 12px; border-bottom: 2px solid var(--wall-shade); }
.admin-table td { padding: 8px 12px; border-bottom: 1px solid var(--wall); white-space: nowrap; }
.admin-table td:first-child { display: flex; align-items: center; gap: 8px; }
.admin-table img { width: 32px; height: 38px; object-fit: contain; }
.admin-table small { color: var(--ink-soft); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .low { color: var(--red-deep); font-weight: 700; }
.admin-table tr.off { opacity: .55; }

.product-form { background: var(--enamel); padding: 18px; margin-bottom: 18px; scroll-margin-top: 72px; }
.product-form h2 { margin-bottom: 12px; }
.product-form-cols { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; }
.photo-pick { display: grid; gap: 8px; align-content: start; }
.photo-pick img { width: 100%; height: 200px; object-fit: contain; object-position: bottom; background: var(--wall); }
.photo-pick small { color: var(--ink-soft); }

.settings { max-width: 720px; }

.plain li { padding: 1px 0; }

/* 页脚 */
.foot { --focus: var(--fluoro); background: var(--shutter); color: var(--enamel); margin-top: 28px; }
.foot-in {
  max-width: var(--page-full);
  margin: 0 auto;
  padding: 22px var(--gutter) 26px;
  font-size: var(--t-sm);
}
.foot-name { font: 400 var(--t-xl)/1.2 var(--display); color: var(--sign-paint); margin-bottom: 4px; }
.foot-info { margin-top: 6px; opacity: .85; white-space: pre-line; }

/* 提示条 */
.toast {
  --focus: var(--fluoro);
  position: fixed; left: 50%; bottom: 20px; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  background: var(--ink); color: var(--enamel);
  border-radius: 3px;
  transform: translate(-50%, 90px);
  transition: transform .2s ease-out;
  visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.bad { background: var(--red-deep); }
.toast button { padding: 0; border: 0; background: none; color: var(--fluoro); font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }

.noscript { padding: 20px; text-align: center; }

@media (max-width: 1240px) {
  .goods-act .btn-cart .icon { display: none; }
}

/* 英文分类名长，窄一点的屏幕就让分类自己占一行，不被挤到要横向滚动 */
@media (max-width: 1140px) {
  .bar-in { flex-wrap: wrap; }
  .aisles { order: 5; flex-basis: 100%; }
  .search { max-width: none; margin-left: 0; }
}

@media (max-width: 1020px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --cell: 6px; }

  .sign-side { text-align: left; }
  .sign-tagline { display: none; }
  .sign-board { gap: 2px 14px; align-items: baseline; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goods { padding-bottom: 26px; }
  .goods-stage { height: 180px; }
  .goods-stage img { height: 150px; }
  .tag { width: 80px; height: 80px; right: 0; }
  .tag-rm { font-size: 13px; }
  .tag-num { font-size: 28px; }
  .tag-num.long { font-size: 23px; }
  .goods-act { grid-template-columns: 1fr 44px; }
  .goods-act .btn-cart span { display: none; }
  .goods-act .btn-cart .icon { display: block; }
  .goods-act .btn-cart { padding: 0; }
  .bar-cart-word, .wide-only { display: none; }
  .bar-in { flex-wrap: wrap; gap: 4px 10px; padding-block: 6px 2px; }
  .bar-cart { min-height: 38px; padding: 4px 10px; }
  .bar-name { font-size: 22px; }
  .search { flex: 1 1 0; min-width: 80px; }
  .search input { width: 100%; padding-block: 5px; }
  .aisles a { padding: 3px 8px; }

  .detail, .checkout, .order-cols, .auth { grid-template-columns: minmax(0, 1fr); }
  .detail-stage .plank::after { width: 300vw; }
  .auth-peek { display: none; }
  .account-links { display: flex; }
  .checkout-bill { position: static; }
  .admin-order-body { grid-template-columns: minmax(0, 1fr); }
  .product-form-cols { grid-template-columns: minmax(0, 1fr); }
  .photo-pick img { height: 150px; }
  .field-row.three { grid-template-columns: 1fr 1fr; }
  .field-row.three > :last-child { grid-column: 1 / -1; }

  .order-list a { grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; padding-right: 14px; }
  .order-thumbs img:nth-child(n + 2) { display: none; }
  .order-list-end { grid-column: 1 / -1; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .shop-closed .shutter { display: none; }
  .badge.bump, .cart[open] { animation: none; }
  .toast { transition: none; }
}
