:root {
  --ink: #202333;
  --muted: #737681;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #e8e2d9;
  --coral: #f05b4f;
  --coral-deep: #dc443b;
  --coral-soft: #fff0ed;
  --yellow: #f7c94b;
  --cyan: #4bbbc1;
  --lilac: #7c73c9;
  --green: #6eb78b;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(32, 35, 51, .07);
}

* { box-sizing: border-box; }
html { background: #e9e4db; color-scheme: light; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 2%, rgba(247, 201, 75, .15), transparent 22%),
    #e9e4db;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  background:
    radial-gradient(circle at 96% 1%, rgba(247, 201, 75, .16), transparent 20%),
    var(--paper);
  box-shadow: 0 0 50px rgba(32, 35, 51, .12);
}

.app-main { min-height: calc(100vh - 64px); }
.screen { min-height: 100vh; }
.page { padding: 12px 12px calc(28px + var(--safe-b)); }
.home-page { padding-top: 0; }

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  padding: 9px 14px 7px;
  border-bottom: 1px solid rgba(232, 226, 217, .92);
  background: rgba(247, 244, 238, .95);
  backdrop-filter: blur(16px);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { display: flex; align-items: center; min-width: 0; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px 13px 13px 4px;
  color: #fff;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--yellow);
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
}
.brand-mark svg { width: 22px; height: 22px; stroke-width: 2.4; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.brand-copy b { overflow: hidden; font-size: 18px; font-weight: 900; line-height: 1.2; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.account-pill {
  display: flex;
  flex: 0 0 auto;
  height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
}
.account-pill svg { width: 15px; height: 15px; }

.search-box {
  display: flex;
  width: 100%;
  height: 43px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 5px 0 13px;
  border: 1px solid #e3dcd2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 35, 51, .04);
}
.search-box > svg { flex: 0 0 auto; width: 20px; height: 20px; transform: rotate(-16deg); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #9b9ca5; }
.search-submit {
  flex: 0 0 auto;
  height: 33px;
  padding: 0 15px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}
.search-box.large { margin-top: 0; }
.hot-keywords { display: flex; height: 30px; align-items: center; gap: 13px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; }
.hot-keywords span { color: var(--coral); font-weight: 800; }
.hot-keywords button { padding: 0; border: 0; color: inherit; background: transparent; font-size: inherit; }

.subhead {
  position: sticky;
  z-index: 35;
  top: 0;
  display: grid;
  min-height: 56px;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, .96);
  backdrop-filter: blur(14px);
}
.subhead h1 { margin: 0; font-size: 15.5px; font-weight: 850; letter-spacing: 0; text-align: left; }
.subhead h1 + span { width: 38px; }
.icon-button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}
.icon-button svg { width: 18px; height: 18px; }

.notice-bar { display: flex; min-height: 38px; align-items: center; gap: 8px; margin: 0 2px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.notice-bar b { flex: 0 0 auto; padding: 2px 7px; border-radius: 5px; color: #604a00; background: #ffe7a4; font-size: 9px; }
.notice-bar p { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-carousel { position: relative; overflow: hidden; border-radius: 14px; background: #ded7cc; box-shadow: 0 14px 30px rgba(32, 35, 51, .13); }
.hero-track { display: flex; transition: transform .45s cubic-bezier(.22, .61, .36, 1); }
.hero-slide { position: relative; display: block; flex: 0 0 100%; min-width: 0; aspect-ratio: 2.04 / 1; overflow: hidden; padding: 0; border: 0; background: #ddd; text-align: left; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 28% 0 0; background: linear-gradient(180deg, transparent, rgba(19, 22, 29, .2) 32%, rgba(19, 22, 29, .9)); }
.hero-copy { position: absolute; z-index: 2; right: 15px; bottom: 15px; left: 15px; color: #fff; }
.hero-copy small { display: block; color: var(--yellow); font-size: 8px; font-weight: 900; letter-spacing: 0; }
.hero-copy b { display: -webkit-box; max-width: 88%; margin-top: 4px; overflow: hidden; font-size: 16px; font-weight: 850; line-height: 1.32; text-shadow: 0 1px 5px rgba(0, 0, 0, .3); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hero-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.hero-meta strong { font-size: 20px; font-weight: 900; }
.hero-meta strong small { color: #fff; font-size: 10px; }
.hero-meta span { padding: 4px 8px; border-radius: 5px; color: var(--ink); background: var(--yellow); font-size: 9px; font-weight: 800; }
.hero-dots { position: absolute; z-index: 3; right: 12px; bottom: 8px; display: flex; gap: 4px; }
.hero-dot { width: 5px; height: 5px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .6); transition: width .2s, background .2s; }
.hero-dot.is-active { width: 14px; background: #fff; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 18px 2px 10px; }
.section-head.compact { align-items: center; margin: 0 0 13px; }
.section-head h2 { margin: 1px 0 0; font-size: 18px; font-weight: 900; line-height: 1.25; letter-spacing: 0; }
.section-kicker { display: block; color: var(--green); font-size: 8px; font-weight: 900; line-height: 1.1; letter-spacing: .6px; }
.section-kicker.red { color: var(--coral); }
.section-side { color: var(--muted); font-size: 9px; }
.text-button { display: flex; align-items: center; gap: 2px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 10px; }
.text-button svg { width: 13px; height: 13px; }

.explore-card { margin-top: 12px; padding: 14px 12px 12px; border: 1px solid rgba(232, 226, 217, .75); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.category-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 4px; }
.category-chip { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 10px; font-weight: 650; text-align: center; }
.category-chip > span,
.category-tile-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: var(--ink); background: #edf8f0; }
.category-chip:nth-child(3n + 2) > span { background: #fff5de; }
.category-chip:nth-child(3n) > span { background: #edf5ff; }
.category-chip:nth-child(4n) > span { background: #fff0ed; }
.category-chip svg { width: 24px; height: 24px; stroke-width: 2; }

.promo-grid { display: grid; grid-template-columns: 1.12fr .88fr; grid-template-rows: 112px 112px; gap: 9px; margin-top: 12px; }
.promo-card { position: relative; min-width: 0; overflow: hidden; padding: 14px 12px; border: 0; border-radius: 12px; text-align: left; }
.promo-card b { display: block; font-size: 15px; font-weight: 900; }
.promo-card small { display: block; margin-top: 4px; font-size: 9px; opacity: .7; }
.promo-main { grid-row: 1 / span 2; color: #fff; background: linear-gradient(145deg, #232638, #171923); }
.promo-main::after { content: ""; position: absolute; right: -17px; bottom: -20px; width: 118px; height: 118px; border: 24px solid rgba(247, 201, 75, .16); border-radius: 50%; }
.promo-main strong { position: relative; z-index: 1; display: block; margin-top: 21px; font-size: 19px; font-weight: 900; line-height: 1.35; }
.promo-main small { position: relative; z-index: 1; margin-top: 7px; }
.promo-main em { position: absolute; z-index: 2; bottom: 14px; left: 12px; display: flex; align-items: center; gap: 3px; font-size: 9px; font-style: normal; }
.promo-main em svg { width: 13px; height: 13px; }
.promo-label { display: inline-block; padding: 3px 7px; border-radius: 4px; color: var(--ink); background: var(--yellow); font-size: 8px; font-weight: 900; }
.promo-yellow { color: var(--ink); background: #ffe083; }
.promo-cyan { color: #173438; background: #cfedf0; }
.promo-ring { position: absolute; right: 10px; bottom: 10px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px dashed rgba(32, 35, 51, .3); border-radius: 50%; }
.promo-ring.light { color: #fff; border-color: rgba(255, 255, 255, .5); background: var(--cyan); }
.promo-ring svg { width: 18px; height: 18px; }

.deal-panel { margin-top: 12px; padding: 13px 12px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.deal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deal-card { min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.deal-image { position: relative; display: block; overflow: hidden; width: 100%; aspect-ratio: 1.5 / 1; border-radius: 9px; background: #f2eee8; }
.deal-image img { width: 100%; height: 100%; object-fit: cover; }
.deal-badge { position: absolute; top: 7px; left: 7px; padding: 3px 6px; border-radius: 4px; color: #fff; background: var(--coral); font-size: 8px; font-weight: 800; }
.deal-card b { display: -webkit-box; overflow: hidden; margin-top: 7px; font-size: 11px; font-weight: 700; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.deal-price { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; }
.deal-price strong { color: var(--coral); font-size: 15px; font-weight: 900; }
.deal-price del { color: #aaa4a0; font-size: 9px; }

.pay-band { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 14px 16px; border-radius: 12px; color: #fff; background: var(--ink); }
.pay-band span, .pay-band small { display: block; }
.pay-band div > span { color: var(--yellow); font-size: 8px; font-weight: 800; }
.pay-band strong { display: block; margin-top: 3px; font-size: 16px; font-weight: 900; }
.pay-band small { margin-top: 4px; color: rgba(255, 255, 255, .65); font-size: 9px; }
.pay-band-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #1677ff; background: #fff; font-size: 22px; font-weight: 900; }

.product-section { margin-top: 18px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
.product-card { min-width: 0; }
.product-visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f1ede6;
}
.product-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-visual > svg { width: 42px; height: 42px; color: var(--muted); }
.product-visual::after { content: "支付宝"; position: absolute; top: 7px; left: 7px; padding: 3px 6px; border-radius: 4px; color: #fff; background: var(--coral); font-size: 8px; font-weight: 800; }
.product-copy { padding-top: 7px; }
.product-copy h3 { display: -webkit-box; min-height: 36px; margin: 0; overflow: hidden; font-size: 11.5px; font-weight: 750; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-copy p { display: none; }
.product-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.price { color: var(--coral); font-size: 16px; font-weight: 900; }
.price small { margin-right: 1px; font-size: 9px; }
.add-button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--ink); }
.add-button svg { width: 16px; height: 16px; }
.product-sales { margin-top: 3px; color: #9d9994; font-size: 8.5px; }

.vertical-products { display: flex; flex-direction: column; gap: 9px; }
.list-card { display: flex; min-width: 0; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.list-visual { display: grid; flex: 0 0 102px; width: 102px; height: 102px; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #f2eee8; }
.list-visual img { width: 100%; height: 100%; object-fit: cover; }
.list-copy { min-width: 0; flex: 1; padding: 2px 0; }
.list-copy h3 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 12px; font-weight: 750; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.list-copy p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.list-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 12px; }
.mini-button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; color: #fff; background: var(--coral); font-size: 9px; font-weight: 700; }

.category-page { padding-top: 12px; }
.category-tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rail-button { display: flex; min-height: 94px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; font-size: 10px; font-weight: 650; }
.rail-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; background: #edf8f0; }
.rail-icon svg { width: 23px; height: 23px; }
.rail-button:nth-child(3n + 2) .rail-icon { background: #fff3d7; }
.rail-button:nth-child(3n) .rail-icon { background: #eaf3ff; }
.rail-button:nth-child(4n) .rail-icon { background: #ffefec; }
.rail-button b { font-size: 10px; font-weight: 650; }
.rail-button.is-active { border-color: rgba(240, 91, 79, .35); color: var(--coral); box-shadow: inset 0 0 0 1px rgba(240, 91, 79, .15); }
.browse-panel { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.browse-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid #f0ece6; }
.browse-item:last-child { border-bottom: 0; }
.browse-item > div { min-width: 0; flex: 1; }
.browse-item b { display: block; font-size: 12px; }
.browse-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.browse-item > svg { width: 15px; height: 15px; color: #b5b0a8; }
.browse-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 9px; }
.browse-icon.yellow { background: #fff0c5; }
.browse-icon.coral { background: #ffe7e2; }
.browse-icon svg { width: 17px; height: 17px; }
.category-title { display: flex; align-items: baseline; justify-content: space-between; margin: 17px 2px 9px; }
.category-title b { font-size: 16px; font-weight: 900; }
.category-title span { color: var(--muted); font-size: 9px; }

.search-page { padding-top: 10px; }
.search-hint { padding: 15px 2px 10px; color: var(--muted); font-size: 10px; }

.detail-page { padding: 0 0 calc(72px + var(--safe-b)); }
.detail-hero { display: grid; width: 100%; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; background: #f1ede6; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy { margin-top: 9px; padding: 15px 14px; border-radius: 12px; background: #fff; }
.detail-copy h2 { margin: 0; font-size: 16px; font-weight: 850; line-height: 1.55; }
.detail-copy .subtitle { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.detail-price { display: flex; align-items: baseline; gap: 8px; margin-top: 11px; color: var(--coral); }
.detail-price small { font-size: 11px; }
.detail-price b { font-size: 27px; font-weight: 900; }
.detail-price del { color: #a7a19a; font-size: 10px; }
.spec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.spec-chip { padding: 5px 8px; border-radius: 5px; color: #7a5b00; background: #fff4cd; font-size: 9px; }
.info-row { display: flex; align-items: flex-start; gap: 7px; margin-top: 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.info-row svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; color: var(--green); }
.detail-description { margin: 14px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.85; }
.detail-actions { position: fixed; z-index: 36; right: max(0px, calc(50% - 240px)); bottom: 0; left: max(0px, calc(50% - 240px)); display: grid; width: min(100%, 480px); grid-template-columns: .9fr 1.1fr; gap: 8px; margin: 0 auto; padding: 9px 12px calc(9px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .98); backdrop-filter: blur(14px); }
.button { min-height: 43px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 8px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 800; }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button:disabled { cursor: not-allowed; opacity: .48; }

.cart-page { min-height: calc(100vh - 140px); padding-bottom: 126px; }
.cart-list { display: flex; flex-direction: column; gap: 8px; }
.cart-item { display: flex; min-width: 0; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.cart-thumb { display: grid; flex: 0 0 84px; width: 84px; height: 84px; place-items: center; overflow: hidden; border-radius: 8px; background: #f2eee8; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-copy { position: relative; min-width: 0; flex: 1; }
.cart-copy h3 { display: -webkit-box; margin: 0 35px 0 0; overflow: hidden; font-size: 11.5px; font-weight: 700; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cart-copy p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.cart-remove { position: absolute; top: -1px; right: 0; padding: 0; border: 0; color: #a8a29a; background: transparent; font-size: 9px; }
.cart-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 15px; }
.cart-line strong { color: var(--coral); font-size: 16px; }
.quantity { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.quantity button { width: 29px; height: 28px; padding: 0; border: 0; background: #fff; font-size: 15px; }
.quantity span { display: grid; min-width: 28px; height: 28px; place-items: center; font-size: 11px; }
#cart-summary { position: fixed; z-index: 37; right: max(0px, calc(50% - 240px)); bottom: calc(58px + var(--safe-b)); left: max(0px, calc(50% - 240px)); width: min(100%, 480px); margin: 0 auto; padding: 9px 12px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .98); backdrop-filter: blur(14px); }
#cart-summary .summary-line { display: none; }
#cart-summary .summary-line.total { display: flex; align-items: center; justify-content: space-between; margin-right: 112px; }
#cart-summary .summary-line.total span { color: var(--muted); font-size: 10px; }
#cart-summary .summary-line.total b { color: var(--coral); font-size: 19px; }
#cart-summary .checkout-submit { position: absolute; right: 12px; bottom: 9px; }
#cart-summary .checkout-submit .button { min-height: 40px; padding: 0 21px; border: 0; color: #fff; background: var(--coral); }
#cart-summary > .button { width: 100%; min-height: 40px; border: 0; color: #fff; background: var(--coral); }

.checkout-page { padding-bottom: 30px; }
.checkout-block { margin-bottom: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.checkout-block h2 { margin: 0 0 12px; font-size: 14px; font-weight: 850; }
.field { margin-top: 10px; }
.field:first-of-type { margin-top: 0; }
.field label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.field input, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--ink); background: #fbfaf8; font-size: 12px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: rgba(240, 91, 79, .65); background: #fff; }
.checkout-items { display: flex; flex-direction: column; gap: 8px; }
.checkout-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.checkout-item span { min-width: 0; flex: 1; }
.checkout-item b { flex: 0 0 auto; color: var(--ink); }
.payment-options { display: flex; flex-direction: column; gap: 8px; }
.pay-choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf8; }
.pay-choice > span { display: flex; align-items: center; gap: 9px; }
.pay-choice b, .pay-choice small { display: block; }
.pay-choice b { font-size: 12px; }
.pay-choice small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.pay-choice input { accent-color: var(--coral); }
.pay-choice.is-disabled { opacity: .55; }
.alipay-mark, .wechat-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: #fff; background: #1677ff; font-weight: 900; }
.wechat-mark { background: #20b95b; }
.cart-summary { margin-top: 9px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.summary-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.summary-line:first-child { margin-top: 0; }
.summary-line.total { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); }
.summary-line.total b { color: var(--coral); font-size: 20px; }
.checkout-submit-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; margin-top: 12px; }
.checkout-submit-row .button { width: 100%; }
.checkout-submit-row .button:not(.secondary) { border-color: var(--coral); background: var(--coral); }
.checkout-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: center; }

.auth-page { padding-top: 7px; padding-bottom: 30px; }
.auth-hero { position: relative; overflow: hidden; padding: 22px 18px 20px; border-radius: 13px; color: #fff; background: #202333; }
.auth-hero::after { content: ''; position: absolute; right: -24px; bottom: -34px; width: 112px; height: 112px; border: 18px solid rgba(247, 201, 75, .78); border-radius: 50%; }
.auth-hero.register-hero { background: #d94f43; }
.auth-kicker { display: block; color: var(--yellow); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.auth-hero h2 { position: relative; z-index: 1; margin: 6px 0 5px; font-size: 23px; font-weight: 900; line-height: 1.25; }
.auth-hero p { position: relative; z-index: 1; max-width: 270px; margin: 0; color: rgba(255, 255, 255, .72); font-size: 10px; line-height: 1.65; }
.auth-card { margin-top: 10px; padding: 16px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.auth-form .field { margin-top: 13px; }
.auth-form .field:first-child { margin-top: 0; }
.auth-form .field label { margin-bottom: 6px; font-size: 10px; font-weight: 700; }
.auth-form .field input { height: 46px; padding: 0 12px; border-radius: 9px; background: #fbfaf8; font-size: 14px; }
.auth-form .field input::placeholder { color: #aaa49c; }
.auth-submit { width: 100%; min-height: 45px; margin-top: 15px; border-color: var(--coral); color: #fff; background: var(--coral); font-weight: 800; }
.auth-error { margin-top: 10px; padding: 9px 10px; border-radius: 8px; color: #a0362e; background: #fff0ed; font-size: 10px; line-height: 1.5; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.auth-switch button, .auth-skip { padding: 0; border: 0; color: var(--coral-deep); background: transparent; font-size: inherit; font-weight: 800; }
.auth-wechat { display: block; width: 100%; min-height: 40px; margin-top: 12px; border: 1px solid #cce8d7; border-radius: 8px; color: #198c4c; background: #f2fbf6; font-size: 11px; font-weight: 750; }
.auth-skip { display: block; margin: 16px auto 0; padding: 7px 12px; color: var(--muted); font-size: 10px; }
.auth-note { margin: 12px 9px 0; color: var(--muted); font-size: 9px; line-height: 1.65; text-align: center; }

.profile-page { padding-top: 10px; }
.member-card { padding: 17px 15px 14px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #292c3d, #191b25); }
.member-top { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 14px 14px 14px 5px; color: var(--ink); background: var(--yellow); box-shadow: 3px 3px 0 rgba(255, 255, 255, .18); }
.avatar svg { width: 25px; height: 25px; }
.member-copy { min-width: 0; flex: 1; }
.member-copy b { display: block; overflow: hidden; font-size: 17px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.member-copy span { display: block; margin-top: 4px; color: rgba(255, 255, 255, .66); font-size: 9.5px; }
.member-tag { align-self: flex-start; padding: 4px 7px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 99px; color: rgba(255, 255, 255, .8); font-size: 8px; }
.member-card .button { width: 100%; min-height: 39px; margin-top: 14px; border: 0; color: var(--ink); background: #fff; }
.member-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.member-card .member-actions { width: 100%; }
.member-card .member-actions .button { margin-top: 0; }
.member-card .member-actions .member-outline { border: 1px solid rgba(255, 255, 255, .38); color: #fff; background: rgba(255, 255, 255, .08); }
.asset-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); margin: -6px 9px 0; padding: 13px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgba(32, 35, 51, .06); }
.asset-grid div { text-align: center; border-right: 1px solid var(--line); }
.asset-grid div:last-child { border-right: 0; }
.asset-grid b { display: block; font-size: 17px; }
.asset-grid span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.login-card { margin-top: 9px; padding: 13px; border-radius: 10px; background: var(--coral-soft); }
.login-card b { font-size: 12px; }
.login-card p { margin: 5px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.login-card .button { min-height: 36px; color: #fff; background: var(--coral); border-color: var(--coral); }
.profile-section { margin-top: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.profile-section h2 { margin: 0 0 10px; font-size: 13px; font-weight: 850; }
.order-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.order-grid button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 2px; border: 0; background: transparent; font-size: 9px; }
.order-grid svg { width: 21px; height: 21px; color: var(--muted); }
.order-history { display: flex; flex-direction: column; }
.order-row { padding: 10px 0; border-bottom: 1px solid #f1ede7; }
.order-row:first-child { padding-top: 0; }
.order-row:last-child { padding-bottom: 0; border-bottom: 0; }
.order-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-row-top b { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.order-row-top em { flex: 0 0 auto; color: var(--coral); font-size: 9px; font-style: normal; }
.order-row p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.menu-grid { display: flex; flex-direction: column; }
.menu-button { display: flex; min-height: 45px; align-items: center; gap: 10px; padding: 0; border: 0; border-bottom: 1px solid #f1ede7; background: transparent; font-size: 11px; text-align: left; }
.menu-button:last-child { border-bottom: 0; }
.menu-button svg { width: 18px; height: 18px; color: var(--coral); }
.menu-button.danger { color: #b6453b; }
.menu-button.danger svg { color: #b6453b; }
.profile-benefits { display: flex; justify-content: center; gap: 24px; margin: 14px 0 7px; color: var(--muted); font-size: 9px; }
.profile-benefits span { position: relative; }
.profile-benefits span + span::before { content: ""; position: absolute; top: 4px; left: -13px; width: 2px; height: 2px; border-radius: 50%; background: #b8b4ac; }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 48px 14px; color: var(--muted); text-align: center; }
.empty-state svg { width: 34px; height: 34px; opacity: .55; }
.empty-state b { color: var(--ink); font-size: 13px; }
.empty-state p { margin: 0; font-size: 10px; line-height: 1.6; }

.site-footer { padding: 25px 18px calc(90px + var(--safe-b)); border-top: 1px solid var(--line); color: var(--muted); background: #f2eee6; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.footer-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px 10px 10px 4px; color: #fff; background: var(--ink); box-shadow: 3px 3px 0 var(--yellow); font-size: 16px; font-weight: 900; }
.footer-brand div { display: flex; flex-direction: column; gap: 2px; }
.footer-brand b { font-size: 14px; font-weight: 900; }
.footer-brand small { color: var(--muted); font-size: 9px; }
.footer-operator, .footer-contact, .footer-license, .footer-copy { margin: 11px 0 0; font-size: 9px; line-height: 1.7; }
.footer-operator b { color: var(--ink); }
.footer-contact a, .footer-license a { color: var(--ink); text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 13px; padding-top: 13px; border-top: 1px solid rgba(32, 35, 51, .09); }
.footer-links a { color: #4e5261; font-size: 9px; font-weight: 700; text-decoration: none; }
.footer-copy { color: #9b968d; }

.bottom-nav {
  position: fixed;
  z-index: 42;
  right: max(0px, calc(50% - 240px));
  bottom: 0;
  left: max(0px, calc(50% - 240px));
  display: grid;
  width: min(100%, 480px);
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  padding: 6px 0 calc(6px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(14px);
}
.bottom-nav button { position: relative; display: flex; min-height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; border: 0; color: #96938d; background: transparent; font-size: 9.5px; font-weight: 650; }
.bottom-nav svg { width: 21px; height: 21px; stroke-width: 2; }
.bottom-nav button.is-active { color: var(--coral); font-weight: 850; }
.badge { position: absolute; top: 1px; left: calc(50% + 7px); display: grid; min-width: 15px; height: 15px; place-items: center; padding: 0 4px; border-radius: 99px; color: #fff; background: var(--coral); font-size: 8px; font-style: normal; }

.page-end { padding: 24px 0 10px; color: #aaa49c; font-size: 9px; text-align: center; }
.toast { position: fixed; z-index: 80; top: 74px; left: 50%; max-width: min(86vw, 360px); padding: 9px 14px; border-radius: 8px; color: #fff; background: rgba(32, 35, 51, .94); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 11px; line-height: 1.45; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, -12px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.modal { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 21, 28, .42); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 1; width: min(100%, 380px); padding: 20px 17px 16px; border-radius: 14px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.modal-card h2 { margin: 0 0 10px; font-size: 17px; font-weight: 900; }
.modal-card p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.modal-close { position: absolute; top: 10px; right: 10px; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f4f1eb; }
.modal-close svg { width: 16px; height: 16px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.modal-actions .button { width: 100%; }
.error-card { margin: 40px 14px; padding: 20px; border: 1px solid #f0d5d1; border-radius: 12px; color: #9d342c; background: #fff5f3; font-size: 11px; line-height: 1.7; }

@media (min-width: 700px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100vh - 40px); border-radius: 18px; overflow: hidden; }
  .topbar, .subhead { top: 0; }
  .bottom-nav { bottom: 20px; border-radius: 0 0 18px 18px; }
  #cart-summary { bottom: calc(78px + var(--safe-b)); }
}

@media (max-width: 359px) {
  .page { padding-right: 9px; padding-left: 9px; }
  .topbar { padding-right: 10px; padding-left: 10px; }
  .brand-copy b { font-size: 15px; }
  .brand-copy small { font-size: 9px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .account-pill { padding: 0 8px; }
  .section-head h2 { font-size: 16px; }
  .category-chip > span, .category-tile-icon { width: 43px; height: 43px; }
  .promo-grid { grid-template-rows: 104px 104px; }
  .product-grid { gap: 12px 8px; }
  .list-visual { flex-basis: 88px; width: 88px; height: 88px; }
  .detail-actions { padding-right: 8px; padding-left: 8px; }
  .button { padding: 0 10px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
