/* ===========================================================
   牛顿教育 · 试卷交易平台
   视觉基调：像一摞整理好的试卷，不像互联网产品
   =========================================================== */

:root {
  --paper: #faf8f4;
  --card: #ffffff;
  --ink: #1a1a1a;
  --ink2: #5f5f5f;
  --ink3: #9a9a9a;
  --line: #e8e3da;
  --line2: #d5cfc2;
  --red: #b5342a;
  --red-dark: #9a2a21;
  --red-bg: #fbf1ef;
  --amber: #c89b3c;
  --amber-bg: #fbf4e4;
  --amber-ink: #8a6416;
  --green: #2f6b4f;
  --green-bg: #eef4f0;
  --gray-bg: #f2f0eb;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.serif {
  font-family: "Songti SC", "SimSun", "STSong", "Noto Serif CJK SC", serif;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 244, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 34px; height: 34px;
  color: var(--red);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg,
.brand-mark img { width: 100%; height: 100%; display: block; }

.brand-txt b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .4px;
  line-height: 1.3;
}

.brand-txt i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--ink3);
  letter-spacing: 1.6px;
  line-height: 1.5;
}

.topnav { display: flex; align-items: center; gap: 22px; }

.topnav a {
  font-size: 13.5px;
  color: var(--ink2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .16s, border-color .16s;
}

.topnav a:hover { color: var(--ink); border-bottom-color: var(--line2); }
.topnav a.dim { color: var(--ink3); font-size: 12.5px; }

/* ---------- 行情条 ---------- */
.board {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 0 4px;
  font-size: 13px;
  color: var(--ink2);
}

.board b {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 600;
  padding: 0 3px;
}

.board .sep { width: 1px; height: 12px; background: var(--line2); }
.board-hint { margin-left: auto; color: var(--ink3); font-size: 12px; letter-spacing: .2px; }

/* ---------- 筛选 ---------- */
.filterbar {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 0 20px;
}

.filterrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filterrow .label {
  font-size: 12px;
  color: var(--ink3);
  width: 34px;
  flex: none;
  letter-spacing: .5px;
}

.chip {
  border: 1px solid var(--line2);
  background: #fff;
  color: var(--ink2);
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 2px;
  cursor: pointer;
  transition: all .14s;
  line-height: 1.6;
}

.chip:hover { border-color: #b6afa0; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 试卷列表 ---------- */
.stock {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
  padding-bottom: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, border-color .18s, transform .18s;
  position: relative;
  min-width: 0;
}

.card:hover {
  border-color: var(--line2);
  box-shadow: 0 8px 22px rgba(26, 26, 26, .07);
  transform: translateY(-1px);
}

.card.is-off { opacity: .68; }

/* 封面：用 CSS 画一张试卷抬头 */
.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
  padding: 30px 22px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cover-brand {
  font-size: 9.5px;
  letter-spacing: 2.4px;
  color: #a49c8c;
  text-align: center;
  font-family: "Songti SC", "SimSun", serif;
}

.cover-title {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
  margin-top: 13px;
  color: #1a1a1a;
  letter-spacing: .5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover-sub {
  text-align: center;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 11.5px;
  color: #77705f;
  margin-top: 7px;
  letter-spacing: 1.4px;
}

.cover-rule { height: 1px; background: #d2cbba; margin-top: 15px; }
.cover-rule.thin { height: 1px; background: #eae4d6; margin-top: 3px; }

.cover-sect {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 9px;
  color: #b3ab9c;
  letter-spacing: .6px;
  margin-top: 12px;
}

.cover-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 14px 0 10px;
}

.cover-lines i { display: block; height: 1px; background: #eae4d6; }
.cover-lines i:nth-child(3n) { width: 84%; }
.cover-lines i:nth-child(4n+1) { width: 92%; }
.cover-lines i:nth-child(5n) { width: 62%; }

.cover-foot {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 9.5px;
  color: #b0a898;
  text-align: center;
  letter-spacing: 1.2px;
}

.badge {
  position: absolute;
  top: 9px;
  right: 9px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 2px;
  letter-spacing: .4px;
  line-height: 1.6;
  z-index: 2;
}

.badge-amber { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid #ecdcb3; }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid #efd3cf; }
.badge-gray { background: var(--gray-bg); color: #8a8a8a; border: 1px solid #e2ded3; }

/* 卡片文字区 */
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; flex: 1; }

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
  height: 3.1em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  font-size: 11.5px;
  color: var(--ink3);
  margin-top: 6px;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  gap: 8px;
}

.price {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  color: var(--red);
  letter-spacing: .2px;
  line-height: 1;
}

.price small { font-size: 12px; margin-right: 2px; font-family: Georgia, serif; }

.foot-tag { font-size: 11px; color: var(--ink3); letter-spacing: .3px; }
.foot-tag.have-answer { color: var(--green); }
.foot-tag.no-answer { color: var(--amber-ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  padding: 11px 20px;
  transition: background .16s, border-color .16s, color .16s;
  background: #fff;
  color: var(--ink);
  white-space: nowrap;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }

.btn-ghost { background: #fff; border-color: var(--line2); color: var(--ink); }
.btn-ghost:hover { border-color: #b0a898; }

.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-danger { background: #fff; border-color: #e3c3bf; color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }

/* ---------- 详情页 ---------- */
.page-head { padding: 26px 0 18px; border-bottom: 1px solid var(--line); }

.crumb { font-size: 12.5px; color: var(--ink3); letter-spacing: .3px; }
.crumb a:hover { color: var(--ink); }

.page-title {
  font-family: "Songti SC", "SimSun", "STSong", serif;
  font-size: 27px;
  line-height: 1.35;
  font-weight: 600;
  margin: 12px 0 0;
  letter-spacing: .5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  padding: 32px 0 80px;
}

.detail-cover-wrap { position: sticky; top: 86px; align-self: start; }

.detail-cover {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 46px 34px 30px;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 34px rgba(26, 26, 26, .06);
}

.detail-cover .cover-brand { font-size: 11px; }
.detail-cover .cover-title { font-size: 21px; margin-top: 20px; -webkit-line-clamp: 4; }
.detail-cover .cover-sub { font-size: 13px; }
.detail-cover .cover-rule { margin-top: 22px; }
.detail-cover .cover-lines { gap: 12px; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.info-table tr { border-bottom: 1px solid var(--line); }

.info-table th {
  text-align: left;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--ink3);
  padding: 11px 0;
  width: 96px;
  letter-spacing: .5px;
  vertical-align: top;
}

.info-table td {
  font-size: 14px;
  color: var(--ink);
  padding: 11px 0;
}

.info-table td.mono { font-family: Georgia, serif; letter-spacing: .3px; }

.section-label {
  font-size: 12px;
  color: var(--ink3);
  letter-spacing: 2px;
  margin: 30px 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.intro-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink2);
  margin: 0;
}

.buy-bar {
  margin-top: 34px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.buy-price { display: flex; align-items: baseline; gap: 8px; }
.buy-price .price { font-size: 28px; }
.buy-price .note { font-size: 12px; color: var(--ink3); }

.buy-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- 支付页 ---------- */
.pay-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 34px 0 70px;
}

.pay-card {
  background: #fff;
  border: 1px solid var(--line);
}

.pay-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pay-head .t { font-size: 13px; color: var(--ink3); letter-spacing: .5px; }
.pay-head .v {
  font-family: Georgia, serif;
  font-size: 30px;
  color: var(--red);
  letter-spacing: .3px;
  line-height: 1.2;
}

.pay-body { padding: 24px 26px 28px; }

.orderid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--paper);
  border: 1px dashed var(--line2);
  padding: 11px 14px;
  margin-bottom: 22px;
}

.orderid-row .k { font-size: 12px; color: var(--ink3); letter-spacing: .5px; }
.orderid-row .id { font-family: Georgia, "Courier New", monospace; font-size: 15px; letter-spacing: .6px; }

.qr-tabs { display: flex; gap: 0; border: 1px solid var(--line2); margin-bottom: 18px; }

.qr-tab {
  flex: 1;
  padding: 9px;
  font-size: 13.5px;
  text-align: center;
  color: var(--ink2);
  cursor: pointer;
  background: #fff;
  border: none;
  border-right: 1px solid var(--line2);
  transition: all .14s;
}

.qr-tab:last-child { border-right: none; }
.qr-tab.on { background: var(--ink); color: #fff; }

.qr-box {
  display: grid;
  place-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  height: 244px;
}

.qr-box img {
  width: 204px;
  height: 204px;
  object-fit: contain;
  display: block;
}

.qr-empty {
  text-align: center;
  color: var(--ink3);
  font-size: 13px;
  line-height: 1.8;
  padding: 30px 10px;
}

.qr-empty b { display: block; color: var(--ink2); font-weight: 500; margin-bottom: 6px; }

.steps { margin: 22px 0 0; padding: 0; list-style: none; }

.steps li {
  position: relative;
  padding-left: 30px;
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.9;
  margin-bottom: 4px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 3px;
  width: 19px;
  height: 19px;
  background: var(--paper);
  border: 1px solid var(--line2);
  color: var(--ink2);
  font-size: 11px;
  font-family: Georgia, serif;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.steps { counter-reset: step; }

.steps li b { color: var(--ink); font-weight: 600; }

.pay-tip {
  font-size: 12.5px;
  color: var(--ink3);
  line-height: 1.8;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pay-tip b { color: var(--amber-ink); font-weight: 500; }

/* ---------- 状态标记 ---------- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 2px;
  letter-spacing: .3px;
  line-height: 1.6;
  white-space: nowrap;
}

.stamp::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }

.stamp-pay { background: var(--gray-bg); color: #7b7b7b; }
.stamp-pay::before { background: #a5a5a5; }
.stamp-wait { background: var(--amber-bg); color: var(--amber-ink); }
.stamp-wait::before { background: var(--amber); }
.stamp-ok { background: var(--green-bg); color: var(--green); }
.stamp-ok::before { background: var(--green); }
.stamp-no { background: var(--red-bg); color: var(--red); }
.stamp-no::before { background: var(--red); }

/* ---------- 订单查询 ---------- */
.order-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 34px 0 70px;
}

.lookup-box {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.lookup-box input {
  flex: 1;
  border: 1px solid var(--line2);
  background: #fff;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  transition: border-color .16s;
}

.lookup-box input:focus { border-color: var(--ink); }
.lookup-hint { font-size: 12px; color: var(--ink3); margin-bottom: 24px; letter-spacing: .2px; }

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.order-card-head .id { font-family: Georgia, monospace; font-size: 14px; letter-spacing: .6px; }

.order-card-body { padding: 16px 18px; }

.order-title { font-size: 14.5px; font-weight: 600; line-height: 1.55; }
.order-meta { font-size: 12.5px; color: var(--ink3); margin-top: 5px; letter-spacing: .2px; }

.order-state-msg {
  font-size: 13px;
  color: var(--ink2);
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--paper);
  border-left: 2px solid var(--line2);
  line-height: 1.8;
}

.order-state-msg.wait { border-left-color: var(--amber); background: var(--amber-bg); color: var(--amber-ink); }
.order-state-msg.ok { border-left-color: var(--green); background: var(--green-bg); color: var(--green); }
.order-state-msg.no { border-left-color: var(--red); background: var(--red-bg); color: var(--red); }

.order-actions { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--ink3);
}
.empty .big {
  font-family: "Songti SC", serif;
  font-size: 19px;
  color: var(--ink2);
  margin-bottom: 10px;
  letter-spacing: .5px;
}
.empty p { font-size: 13px; margin: 0; line-height: 1.9; }

/* ---------- 常见问题 ---------- */
.faq { border-top: 1px solid var(--line); padding: 34px 0 44px; margin-top: 20px; }

.faq-title {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--ink2);
  margin: 0 0 18px;
}

.faq-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 34px; }

.faq-item q {
  display: block;
  font-style: normal;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 5px;
  quotes: none;
}

.faq-item p { font-size: 13px; color: var(--ink3); line-height: 1.85; margin: 0; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.9;
  letter-spacing: .2px;
}

.footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, .38);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade .16s ease;
}

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .16);
  animation: rise .18s ease;
}

@keyframes rise { from { transform: translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .3px; }

.modal-close {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--ink3);
  cursor: pointer;
  padding: 0 2px;
}

.modal-body { padding: 20px; }
.modal-foot { padding: 0 20px 20px; display: flex; gap: 9px; }
.modal-foot .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--ink3);
  letter-spacing: .4px;
  margin-bottom: 6px;
}

.field .req { color: var(--red); margin-left: 2px; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line2);
  background: #fff;
  padding: 9px 11px;
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  transition: border-color .16s;
  color: var(--ink);
}

.input:focus, .textarea:focus, .select:focus { border-color: var(--ink); }
.textarea { resize: vertical; min-height: 74px; line-height: 1.7; }
.field-hint { font-size: 11.5px; color: var(--ink3); margin-top: 5px; line-height: 1.7; }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 42px;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: all .22s ease;
  z-index: 90;
  max-width: 80vw;
  line-height: 1.7;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 后台 ---------- */
.admin-body { background: #f5f2ec; }

.admin-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.admin-head-in {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-title { font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.admin-title span { color: var(--ink3); font-weight: 400; margin-left: 8px; font-size: 12.5px; }

.tabs { display: flex; gap: 2px; }

.tab {
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--ink2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .14s;
}

.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--red); font-weight: 500; }
.tab .cnt {
  font-family: Georgia, serif;
  font-size: 11px;
  color: var(--red);
  margin-left: 4px;
}

.panel { display: none; padding: 26px 0 60px; }
.panel.on { display: block; }

.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.admin-card-head h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .5px;
}

.admin-card-body { padding: 20px; }

/* 表格 */
.tbl-wrap { overflow-x: auto; }

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

.tbl thead th {
  text-align: left;
  font-weight: 400;
  font-size: 11.5px;
  color: var(--ink3);
  letter-spacing: 1px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fdfbf7; }

.tbl .cell-title { font-weight: 600; line-height: 1.55; min-width: 240px; }
.tbl .cell-sub { font-size: 11.5px; color: var(--ink3); margin-top: 3px; font-weight: 400; }
.tbl .cell-money { font-family: Georgia, serif; color: var(--red); }
.tbl .cell-ops { white-space: nowrap; }
.tbl .cell-ops .btn { margin-right: 6px; }
.tbl .cell-mono { font-family: Georgia, monospace; letter-spacing: .5px; white-space: nowrap; }

.file-state { font-size: 11.5px; line-height: 1.9; white-space: nowrap; }
.file-state .has { color: var(--green); }
.file-state .none { color: #b3aba0; }
.file-state .pending { color: var(--amber-ink); }

/* 收款码上传区 */
.qr-up { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }

.qr-preview {
  width: 150px;
  height: 150px;
  border: 1px dashed var(--line2);
  background: var(--paper);
  display: grid;
  place-items: center;
  color: var(--ink3);
  font-size: 12px;
  text-align: center;
  line-height: 1.7;
  overflow: hidden;
  flex: none;
}

.qr-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }

.qr-up-info { flex: 1; min-width: 220px; }
.qr-up-info .name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.qr-up-info .tip { font-size: 12px; color: var(--ink3); line-height: 1.8; margin-bottom: 12px; }

/* 登录页 */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
}

.login-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 30px 26px 26px;
}

.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }

/* 空行提示 */
.hint-line {
  font-size: 13px;
  color: var(--ink3);
  background: var(--paper);
  border-left: 2px solid var(--line2);
  padding: 10px 14px;
  line-height: 1.8;
  margin-bottom: 18px;
}

.hint-line b { color: var(--ink2); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; gap: 26px; }
  .detail-cover-wrap { position: static; max-width: 300px; }
  .page-title { font-size: 22px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-in { height: 60px; }
  .brand-txt i { display: none; }
  .topnav { gap: 16px; }
  .stock { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cover { padding: 26px 15px 13px; }
  .cover-title { font-size: 13px; -webkit-line-clamp: 2; }
  .cover-sub { font-size: 10px; letter-spacing: .8px; }
  .cover-sect { font-size: 8.5px; margin-top: 8px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 12.5px; }
  .price { font-size: 17px; }
  .board-hint { display: none; }
  .filterrow .label { width: 26px; font-size: 11.5px; }
  .chip { padding: 3px 10px; font-size: 12.5px; }
  .page-title { font-size: 19px; }
  .detail-cover-wrap { max-width: 240px; }
  .pay-shell { padding: 20px 0 50px; }
  .pay-head { padding: 16px 18px; }
  .pay-head .v { font-size: 26px; }
  .pay-body { padding: 16px 18px 20px; }
  .orderid-row { margin-bottom: 16px; }
  .qr-tabs { margin-bottom: 14px; }
  .qr-box { height: 200px; padding: 12px; }
  .qr-box img { width: 172px; height: 172px; }
  .qr-empty { padding: 10px 6px; }
  .steps { margin-top: 16px; }
  .steps li { line-height: 1.75; }
  .pay-tip { margin-top: 12px; padding-top: 12px; }
  .order-shell { padding: 22px 0 50px; }
  .lookup-box { flex-direction: column; }
  .lookup-box .btn { width: 100%; }
  .tabs { gap: 0; overflow-x: auto; }
  .tab { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
  .modal { max-width: 100%; }
  .field-row { flex-direction: column; gap: 0; }
  .buy-bar { padding: 15px 16px; }
  .buy-price .price { font-size: 23px; }
}

/* ===========================================================
   设计升级 · 刊头 / 卡片 / 页脚 / 移动端购买条
   =========================================================== */

::selection { background: #f0dcd8; color: var(--ink); }

/* 刊头：上下双线，像试卷密封线 */
.masthead {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line2);
  margin-top: 16px;
}
.masthead .board { padding: 11px 0; }
.masthead .board b { font-size: 18px; }

/* 卡片：抬起更明显，封面跟着亮一点 */
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 26, 26, .09);
  border-color: #cfc7b6;
}
.card:hover .cover { background: #fffefa; }
.card:active { transform: translateY(-1px); }

.price { font-family: Georgia, "Times New Roman", serif; letter-spacing: .3px; }

/* 页脚品牌行 */
.foot-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 10px;
}
.foot-brand img { width: 15px; height: 15px; opacity: .85; }
.foot-brand span {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 13px; letter-spacing: 3px; color: var(--ink2);
}

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

/* 移动端吸底购买条 */
.buy-dock { display: none; }

@media (max-width: 640px) {
  body.has-dock { padding-bottom: 78px; }
  .buy-dock {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: 14px; right: 14px; bottom: 14px;
    background: var(--red); color: #fff;
    padding: 14px 18px; border-radius: 4px;
    font-size: 15px; letter-spacing: 1px; z-index: 60;
    box-shadow: 0 8px 24px rgba(181, 52, 42, .26);
  }
  .buy-dock:active { background: var(--red-dark); }
  .masthead { margin-top: 12px; }
  .masthead .board b { font-size: 16px; }
  .foot-brand span { font-size: 12px; letter-spacing: 2px; }
}

/* 搜索条 */
.searchbar { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.searchbar input {
  flex: 1; min-width: 0; font: inherit; font-size: 14px;
  padding: 11px 14px; border: 1px solid var(--line2); border-radius: 3px;
  background: #fff; color: var(--ink); letter-spacing: .02em;
}
.searchbar input:focus { outline: none; border-color: var(--ink); }
.searchbar input::placeholder { color: #b5b0a6; }
.searchbar input::-webkit-search-cancel-button { cursor: pointer; }
.s-count { font-size: 12px; color: var(--ink3); white-space: nowrap; letter-spacing: .04em; }
@media (max-width: 640px) {
  .searchbar input { font-size: 13.5px; padding: 10px 12px; }
}
