@charset "utf-8";
/* ============================================================
   忆秋卡密 · 浅色极简主题（手机优先）
   白底 / 灰线 / 圆角 / 单一强调色
   ============================================================ */

:root {
  --bg:        #f6f7f9;
  --card:      #ffffff;
  --line:      #ecedf1;
  --line-2:    #e2e4e9;
  --txt:       #16181d;
  --txt-2:     #5f6672;
  --txt-3:     #98a0ad;
  --brand:     #1677ff;
  --brand-d:   #0f5fd0;
  --brand-l:   #eef5ff;
  --ok:        #12b76a;
  --ok-l:      #eafaf1;
  --warn:      #f79009;
  --warn-l:    #fff7e8;
  --danger:    #f04438;
  --danger-l:  #feeceb;
  --r:         16px;
  --r-md:      12px;
  --r-sm:      9px;
  --sh:        0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --sh-up:     0 -2px 12px rgba(16, 24, 40, .06);
  --max:       560px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:active { opacity: .7; }

img { max-width: 100%; display: block; border: 0; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

code {
  background: #f2f3f6;
  border-radius: 5px;
  padding: 1px 5px;
  color: #374151;
  word-break: break-all;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p  { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }

/* ---------------- 工具类 ---------------- */
.muted   { color: var(--txt-2); }
.accent  { color: var(--brand); }
.small   { font-size: 13px; }
.center  { text-align: center; }
.right   { text-align: right; }
.nowrap  { white-space: nowrap; }
.block   { display: block; }
.grow    { flex: 1; min-width: 0; }
.mute    { color: var(--txt-3); }
.mb      { margin-bottom: 12px; }
.mt      { margin-top: 14px; }
.mt4     { margin-top: 4px; }
.row-gap { display: flex; gap: 12px; align-items: center; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 56px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
}

.brand-logo {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #1677ff, #3d8bff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(22, 119, 255, .25);
}

.brand-logo.sm { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
img.brand-logo { object-fit: cover; background: #fff; }

.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-txt b {
  font-size: 15px; font-weight: 700; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-txt i {
  font-style: normal; font-size: 11px; color: var(--txt-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex: none;
}

.nav-item {
  font-size: 13px;
  color: var(--txt-2);
  padding: 7px 11px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-item.on {
  color: var(--brand);
  background: var(--brand-l);
  font-weight: 600;
}

/* ---------------- 容器 ---------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
}

/* ---------------- 公告 ---------------- */
.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--warn-l);
  border: 1px solid #ffe4b8;
  color: #8a5300;
  font-size: 13px;
  line-height: 1.5;
  border-radius: var(--r-md);
  padding: 11px 13px;
  margin-bottom: 14px;
}

.notice-ico {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- 提示 toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(90vw, 420px);
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  animation: slideDown .25s ease;
}

.toast.ok     { border-color: #b7ebd0; background: var(--ok-l);     color: #067647; }
.toast.danger { border-color: #fbc9c5; background: var(--danger-l); color: #b42318; }
.toast.warn   { border-color: #fde2b3; background: var(--warn-l);   color: #8a5300; }

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- 提示条 ---------------- */
.alert {
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid var(--line-2);
  background: #fafbfc;
  color: var(--txt-2);
}

.alert.ok     { background: var(--ok-l);     border-color: #b7ebd0; color: #067647; }
.alert.danger { background: var(--danger-l); border-color: #fbc9c5; color: #b42318; }
.alert.warn   { background: var(--warn-l);   border-color: #fde2b3; color: #8a5300; }
.alert.info   { background: var(--brand-l);  border-color: #cfe3ff; color: #0b4ea2; }
.alert a { text-decoration: underline; }

/* ---------------- 首页 hero ---------------- */
.hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: var(--sh);
}

.hero-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.hero-sub {
  font-size: 13.5px;
  color: var(--txt-2);
  margin-bottom: 2px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f7;
  color: var(--txt-2);
  font-weight: 500;
}

.tag.ok { background: var(--ok-l); color: #067647; }

/* ---------------- 商品网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}

.pcard:active { transform: scale(.985); }

.pcard.soldout { opacity: .55; }

.pcard-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f2f4f8;
  overflow: hidden;
}

.pcard-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pcard-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #c3c9d4;
  background: linear-gradient(135deg, #f7f8fb, #eef1f6);
}

.pcard-ph.lg { font-size: 34px; }

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  color: var(--txt-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.badge.warn   { background: #fff; color: var(--warn); }
.badge.danger { background: #fff; color: var(--danger); }

.pcard-body { padding: 10px 11px 12px; flex: 1; display: flex; flex-direction: column; }

.pcard-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 38px;
}

.pcard-meta {
  font-size: 11.5px;
  color: var(--txt-3);
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
}

.pcard-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.price i {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
}

.price.lg { font-size: 22px; }
.price.xl { font-size: 30px; }

.go-btn {
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  padding: 7px 13px;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .22);
}

/* ---------------- 特性行 ---------------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.feature-ico { font-size: 19px; line-height: 1; }
.feature b { font-size: 12.5px; font-weight: 600; }
.feature span { font-size: 11px; color: var(--txt-3); }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.empty-ico { font-size: 34px; margin-bottom: 10px; opacity: .5; }
.empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }

/* ---------------- 面包屑 ---------------- */
.crumb {
  font-size: 12.5px;
  color: var(--txt-3);
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.crumb a { color: var(--txt-2); }

/* ---------------- 商品详情 ---------------- */
.detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  margin-bottom: 12px;
}

.detail-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f2f4f8;
}

.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-body { padding: 16px; }

.detail-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}

.detail-cell { display: flex; flex-direction: column; gap: 2px; }
.detail-left  { color: var(--txt-2); flex: none; }
.detail-right { text-align: right; color: var(--txt); font-weight: 500; }

.price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 0 4px;
}

/* ---------------- 表单 ---------------- */
.buy-form { display: flex; flex-direction: column; gap: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field > span {
  font-size: 13px;
  font-weight: 500;
  color: var(--txt-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field > span em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--txt-3);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--txt);
  background: #fbfbfd;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { min-height: 88px; resize: vertical; line-height: 1.55; }

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2398a0ad' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}

.field input::placeholder,
.field textarea::placeholder { color: #b6bcc7; }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }

/* 数量 */
.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #fbfbfd;
  width: fit-content;
}

.qty input {
  width: 62px;
  height: 42px;
  text-align: center;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  -webkit-appearance: none;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--txt-2);
  font-size: 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:active { background: #eef1f6; }

/* 支付方式 */
.pay-list { display: flex; flex-direction: column; gap: 9px; }

.pay-item { position: relative; display: block; }
.pay-item input { position: absolute; opacity: 0; pointer-events: none; }

.pay-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-md);
  background: #fff;
  transition: border-color .15s, background .15s;
}

.pay-item input:checked + .pay-box {
  border-color: var(--brand);
  background: var(--brand-l);
}

.pay-dot {
  width: 17px; height: 17px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  background: #fff;
  position: relative;
}

.pay-item input:checked + .pay-box .pay-dot {
  border-color: var(--brand);
  border-width: 5px;
}

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line-2);
  font-size: 13.5px;
  color: var(--txt-2);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--txt);
  cursor: pointer;
  text-align: center;
  transition: opacity .15s, transform .1s, background .15s;
  -webkit-appearance: none;
}

.btn:active { transform: scale(.985); }

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 119, 255, .26);
}

.btn.primary:active { background: var(--brand-d); }

.btn.ghost { background: #fff; color: var(--txt-2); }

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.sm  { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn.lg  { min-height: 50px; font-size: 16px; border-radius: var(--r-md); }
.btn.block { display: flex; width: 100%; }

.btn:disabled { opacity: .45; pointer-events: none; }

/* 小按钮组 */
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  font-family: inherit;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--txt-2);
  cursor: pointer;
  white-space: nowrap;
}

.mini-btn:active { background: #f2f4f8; }

.mini-btn.on {
  background: var(--brand-l);
  border-color: #cfe3ff;
  color: var(--brand);
  font-weight: 600;
}

.mini-btn.danger { color: var(--danger); border-color: #fbc9c5; }

.mini-input {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: #fbfbfd;
  outline: none;
}

.mini-input:focus { border-color: var(--brand); background: #fff; }

.mini-copy {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin-left: 6px;
  font-size: 11.5px;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--txt-2);
  cursor: pointer;
  vertical-align: middle;
}

.inline-form { display: inline-flex; gap: 6px; align-items: center; }

/* 表单底部操作 */
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-actions .btn { flex: 1; }

/* ---------------- 支付页 ---------------- */
.pay-page { display: flex; flex-direction: column; gap: 12px; }

.pay-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--sh);
}

.pay-amt {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--txt);
  line-height: 1.1;
  margin-bottom: 6px;
}

.pay-amt i {
  font-style: normal;
  font-size: 18px;
  font-weight: 600;
  margin-right: 2px;
}

.order-no {
  font-size: 12.5px;
  color: var(--txt-3);
  margin-top: 10px;
  word-break: break-all;
}

.order-no b { color: var(--txt-2); font-weight: 600; }

.qr-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--sh);
}

.qr-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: #fff;
}

.qr-render {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-render canvas, .qr-render img { border-radius: 8px; }

.qr-tip { font-size: 14px; line-height: 1.6; }

.pay-actions { display: flex; flex-direction: column; gap: 10px; }

.pay-note {
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.75;
  padding: 2px 4px;
}

.pay-note p { margin: 0; }

/* ---------------- 订单 ---------------- */
.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--sh);
  margin-bottom: 12px;
}

.order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-product { font-size: 16px; font-weight: 700; line-height: 1.4; }

.status {
  flex: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f7;
  color: var(--txt-2);
}

.status.ok     { background: var(--ok-l);     color: #067647; }
.status.warn   { background: var(--warn-l);   color: #8a5300; }
.status.danger { background: var(--danger-l); color: #b42318; }
.status.mute   { background: #f3f4f7;         color: var(--txt-3); }

.kv-list { border-top: 1px solid var(--line); }

.kv {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}

.kv:last-child { border-bottom: 0; }
.kv span { color: var(--txt-2); flex: none; }
.kv b { font-weight: 600; text-align: right; word-break: break-all; }

.card-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  margin-bottom: 12px;
}

.card-result-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fbfcfd;
}

.card-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px dashed var(--line);
}

.card-line:last-child { border-bottom: 0; }

.card-idx {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--brand-l);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-all;
  color: #111827;
  background: transparent;
  padding: 0;
}

.code-sm { font-size: 12px; }

.pending-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 34px 20px;
  text-align: center;
  box-shadow: var(--sh);
}

.spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 14px;
  border: 2.5px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 查单 ---------------- */
.query-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 18px 22px;
  text-align: center;
  box-shadow: var(--sh);
}

.query-ico { font-size: 32px; margin-bottom: 10px; opacity: .55; }
.query-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }

.query-form { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }

.input-group { display: flex; gap: 8px; }

.input-group input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fbfbfd;
  outline: none;
}

.input-group input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--sh);
  margin-bottom: 12px;
}

.card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--sh);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.intro {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--txt-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------- 页脚 ---------------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 16px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--txt-3);
  line-height: 1.8;
}

.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; }
.footer-links a { color: var(--txt-2); }
.footer-tip { margin-bottom: 6px; }
.footer-copy { opacity: .8; }

/* ---------------- 登录 / 安装 ---------------- */
.auth-body { background: var(--bg); }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 22px 24px;
  box-shadow: 0 10px 40px rgba(16, 24, 40, .07);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.auth-card .brand {
  flex-direction: column;
  gap: 8px;
  text-align: center;
  margin-bottom: 8px;
}

.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand-sub  { font-size: 12.5px; color: var(--txt-3); margin-top: -4px; }

.auth-card .btn { margin-top: 6px; }

.check-list { display: flex; flex-direction: column; gap: 2px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child { border-bottom: 0; }

.dot-ok,
.dot-bad,
.dot-warn {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot-ok   { background: var(--ok); }
.dot-bad  { background: var(--danger); }
.dot-warn { background: var(--warn); }

/* ============================================================
   后台（手机优先：侧栏变顶部横向导航）
   ============================================================ */

.admin-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.side {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.side-brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 6px;
}

.side-brand b {
  display: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-brand i { display: none; }

.side-nav {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 9px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar { display: none; }

.side-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--txt-2);
  white-space: nowrap;
}

.side-item.on {
  background: var(--brand-l);
  color: var(--brand);
  font-weight: 600;
}

.side-ico { font-size: 13px; line-height: 1; }

.side-foot {
  flex: none;
  display: flex;
  gap: 2px;
  padding-left: 4px;
  border-left: 1px solid var(--line);
  margin-left: 2px;
}

.side-foot .side-item { padding: 7px 8px; }
.side-foot .side-item span:last-child { display: none; }
.side-foot .side-ico { font-size: 15px; }

/* 主区域 */
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.admin-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.admin-head-right { flex: none; display: flex; gap: 6px; align-items: center; }

.admin-content {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 14px calc(24px + env(safe-area-inset-bottom));
}

.admin-foot {
  padding: 8px 14px 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--txt-3);
}

/* ---------------- 统计卡 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 13px;
  box-shadow: var(--sh);
}

.stat-label { font-size: 12px; color: var(--txt-3); margin-bottom: 5px; }

.stat-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--txt);
}

.stat-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; }

/* ---------------- 徽标 pill ---------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f7;
  color: var(--txt-2);
  white-space: nowrap;
}

.pill.ok   { background: var(--ok-l);     color: #067647; }
.pill.warn { background: var(--warn-l);   color: #8a5300; }
.pill.mute { background: #f3f4f7;         color: var(--txt-3); }

/* ---------------- 表格 ---------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: 12px;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 520px;
}

.tbl thead th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--txt-3);
  background: #fafbfc;
  padding: 10px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}

.tbl tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--txt);
  vertical-align: middle;
  word-break: break-all;
}

.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:active { background: #fafbfc; }

.tbl .cell-name {
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 筛选栏 ---------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 12px;
}

.filter-bar form { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 14px 0 4px;
  font-size: 12.5px;
  color: var(--txt-3);
}

/* ---------------- 日志列表 ---------------- */
.list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.list-row {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

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

.log-msg {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--txt-2);
  word-break: break-all;
}

/* ---------------- 简易柱状图 ---------------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 120px;
  padding: 6px 0 0;
}

.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.chart-val { font-size: 9.5px; color: var(--txt-3); line-height: 1; }

.chart-bar {
  width: 100%;
  max-width: 30px;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #5aa2ff, #1677ff);
}

.chart-x { font-size: 9.5px; color: var(--txt-3); line-height: 1; }

/* ============================================================
   宽屏适配（>=900px）：后台恢复左侧栏
   ============================================================ */
@media (min-width: 900px) {
  .admin-body { flex-direction: row; }

  .side {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 216px;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 12px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: #fff;
  }

  .side-brand { padding: 0 6px 16px; }
  .side-brand b { display: block; }
  .side-brand i {
    display: block;
    font-style: normal;
    font-size: 11px;
    color: var(--txt-3);
    font-weight: 400;
  }

  .side-nav {
    flex-direction: column;
    overflow: visible;
    padding: 0;
    gap: 3px;
  }

  .side-item { padding: 10px 12px; font-size: 14px; }
  .side-ico { font-size: 15px; }

  .side-foot {
    margin-top: auto;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    flex-direction: column;
    gap: 3px;
  }

  .side-foot .side-item { padding: 10px 12px; }
  .side-foot .side-item span:last-child { display: inline; }
  .side-foot .side-ico { font-size: 15px; }

  .admin-head { padding: 22px 24px 12px; }
  .admin-content { padding: 0 24px 40px; }
  .admin-title { font-size: 22px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }

  .grid { gap: 14px; }
  .pcard-name { font-size: 14.5px; min-height: 40px; }
}

/* 窄屏微调 */
@media (max-width: 360px) {
  body { font-size: 14.5px; }
  .wrap { padding-left: 11px; padding-right: 11px; }
  .hero { padding: 17px 14px; }
  .hero-title { font-size: 19px; }
  .price { font-size: 16px; }
  .go-btn { padding: 6px 10px; font-size: 12px; }
  .pcard-body { padding: 9px 9px 10px; }
  .pcard-name { font-size: 13.5px; }
}

/* ============================================================
   前台商品列表（列表式）
   ============================================================ */
.plist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prow {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  color: inherit;
  transition: transform .12s ease;
}

.prow:active { transform: scale(.99); }
.prow.soldout { opacity: .6; }

.prow-thumb {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(135deg, #f2f6ff, #e8f0ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prow-thumb img { width: 100%; height: 100%; object-fit: cover; }

.prow-ph {
  font-size: 24px;
  font-weight: 700;
  color: #a9c4f0;
}

.prow-main { flex: 1; min-width: 0; }

.prow-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prow-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--txt-3);
  margin-bottom: 9px;
}

.prow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.buy-btn {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: 9px;
  padding: 8px 15px;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .22);
}

.prow-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 0 var(--r) 0 10px;
  background: var(--warn-l);
  color: var(--warn);
}

.prow-badge.danger { background: var(--danger-l); color: var(--danger); }

/* ============================================================
   查单结果列表
   ============================================================ */
.qlist {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.qitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh);
  color: inherit;
}

.qitem:active { background: #fafbfc; }

.qitem-main { flex: 1; min-width: 0; }

.qitem-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qitem-meta {
  font-size: 11.5px;
  color: var(--txt-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.6;
}

.qitem-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.qitem-right .price { font-size: 15px; }

/* 去掉入场动画（省电、少闪烁） */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   无刷新切换（PJAX）
   ============================================================ */

/* 顶部加载细线 */
.pjax-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0;
  background: var(--brand);
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(22, 119, 255, .5);
}

/* 内容换入时的轻微上浮 */
@keyframes pjaxIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

#app.pjax-in {
  animation: pjaxIn .26s cubic-bezier(.2, .7, .3, 1) both;
}

/* 详情页封面限高：没配图时别占掉半屏 */
.detail-thumb {
  max-height: 190px;
}

.detail-thumb .pcard-ph.lg {
  font-size: 30px;
}

/* 列表项按下反馈更跟手 */
.qitem:active {
  background: #f4f6f9;
}