/* 九江泉藏拍卖 —— 公共样式
 * 沿用老站的取色: 墨绿 #223a30 / 金 #c9a45c / 米底 #eae2cf, 标题楷体。
 * 一律移动优先(max-width 540px 居中), 因为客户几乎全在手机上看。 */
:root {
  --ink: #223a30;
  --ink2: #35564a;
  --gold: #c9a45c;
  --gold-d: #9a7a2e;
  --paper: #eae2cf;
  --card: #fffdf7;
  --line: #ded3b8;
  --red: #b3261e;
  --green: #1f7a45;
  --grey: #7e7c72;
  --tabh: 56px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  max-width: 540px;
  margin: 0 auto;
  padding-bottom: calc(var(--tabh) + 18px);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; display: block; }
.kai { font-family: "Kaiti SC", KaiTi, STKaiti, "Songti SC", serif; }

/* ---------- 顶栏 ---------- */
.qp-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  height: 50px; padding: 0 10px;
  background: var(--ink); color: #f3ecd8;
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
}
.qp-title { flex: 1; font-family: "Kaiti SC", KaiTi, STKaiti, serif; font-size: 18px; letter-spacing: 2px; }
.qp-back { width: 34px; height: 34px; line-height: 32px; text-align: center; font-size: 26px; color: #f3ecd8; }
/* 右上角那颗按键。链接(<a>)和按钮(<button>)都用它, 所以要把按钮自带的灰底方框清掉 */
.qp-head .qp-hbtn { margin-left: auto; font-size: 13px; color: var(--gold); padding: 4px 6px;
  background: none; border: 0; font-family: inherit; cursor: pointer; }

/* ---------- 底部导航 ---------- */
.qp-tab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 540px; margin: 0 auto;
  display: flex; background: #fbf7ec; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.qp-tab-i { flex: 1; text-align: center; padding: 6px 0 7px; color: var(--grey); font-size: 11px; }
.qp-tab-i b { display: block; font-size: 19px; font-weight: 400; line-height: 1.15; filter: grayscale(1) opacity(.55); }
.qp-tab-i.on { color: var(--gold-d); }
.qp-tab-i.on b { filter: none; }

/* ---------- 卡片 / 通用块 ---------- */
.wrap { padding: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.card.tight { padding: 10px; }
.hr { height: 1px; background: var(--line); margin: 10px 0; }
.muted { color: var(--grey); font-size: 12.5px; }
.small { font-size: 12.5px; }
.big { font-size: 22px; font-weight: 700; }
.gold { color: var(--gold-d); }
.red { color: var(--red); }
.green { color: var(--green); }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagline { font-family: "Kaiti SC", KaiTi, serif; letter-spacing: 3px; color: var(--gold); font-size: 12px; }

/* ---------- 按钮 ---------- */
.qp-btn {
  display: block; width: 100%; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, #d8b46a, var(--gold-d));
  color: #fff8e6; font-size: 16px; font-weight: 600; padding: 11px 14px;
  font-family: inherit; cursor: pointer;
}
.qp-btn:disabled { opacity: .5; }
.qp-btn.ghost { background: #f2ecdb; color: var(--ink2); border: 1px solid var(--line); }
.qp-btn.dark { background: linear-gradient(180deg, #35564a, var(--ink)); }
.qp-btn.red { background: linear-gradient(180deg, #c8433a, var(--red)); }
.qp-btn.sm { width: auto; display: inline-block; font-size: 13px; padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.qp-btn.xs { width: auto; display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 7px; font-weight: 500; }
.qp-row { display: flex; gap: 10px; margin-top: 12px; }
.qp-row .qp-btn { flex: 1; }
/* 老站编号那一行: 输入框占满, 按钮保持自己的宽度(不许被拉长) */
.sync-row { display: flex; gap: 8px; align-items: center; }
.sync-row .qp-in { flex: 1; min-width: 0; }
.sync-row .qp-btn { flex: none; }
.qp-tip.warn { color: var(--red); }

/* ---------- 输入 ---------- */
.qp-lab { display: block; font-size: 13px; color: var(--ink2); margin: 10px 0 4px; }
/* 填手机号前那个协议勾选。手机号是个人信息, 收之前得让人看得见这一行 */
.qp-agree { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0 2px;
  font-size: 12.5px; color: var(--ink2); line-height: 1.5; }
.qp-agree input { width: 16px; height: 16px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--gold-d); }
.qp-agree a { color: var(--gold-d); }
.qp-in, .qp-sel, textarea.qp-in {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 9px 10px; font-size: 16px; font-family: inherit; color: var(--ink);
}
textarea.qp-in { min-height: 70px; resize: vertical; }
.qp-in:focus, .qp-sel:focus { outline: 2px solid rgba(201,164,92,.5); border-color: var(--gold); }
.qp-in[readonly] { background: #f4efe2; color: var(--grey); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }

/* ---------- 拍品卡 ---------- */
.pcard { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px; margin-bottom: 10px; }
.pcard .ph { width: 96px; height: 96px; flex: none; border-radius: 9px; overflow: hidden; background: #efe8d6; position: relative; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .nopic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bdb49c; font-size: 12px; }
.pcard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcard .tt { font-size: 15px; font-weight: 600; line-height: 1.35; }
.pcard .meta { font-size: 12px; color: var(--grey); margin-top: 2px; }
.pcard .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.price { color: var(--red); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.price i { font-size: 12px; font-style: normal; font-weight: 400; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; }
.badge.live { color: var(--red); }
.badge.soon { color: var(--gold-d); }
.badge.done { color: var(--grey); }
.badge.sold { color: var(--green); }

/* ---------- 搜索 / 标签页 ---------- */
.searchbar { display: flex; gap: 8px; padding: 10px 12px 0; }
.searchbar input { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px; font-size: 15px; background: #fff; font-family: inherit; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 2px; -webkit-overflow-scrolling: touch; }
.tabs a { flex: none; padding: 6px 14px; border-radius: 16px; background: #f2ecdb; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink2); }
.tabs a.on { background: var(--ink); color: #f3ecd8; border-color: var(--ink); }
/* 放在 .wrap 里的时候(比如「我的藏品」的朝代标签): 外面那圈内边距已经有了, 左右不再加一遍 */
.tabs.flush { padding: 8px 0 2px; }

/* ---------- 详情页 ---------- */
.gallery { position: relative; background: #ded6c2; }
.gallery .main { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #e7e0cd; }
.gallery .dots { position: absolute; right: 10px; bottom: 8px; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 10px; }
/* 缩略图条是 .gallery 的**兄弟**节点(不能放进 gallery, 不然会盖住右下角那张数字), 所以这里不能只写 .gallery .thumbs */
.thumbs, .gallery .thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 7px 10px; background: #f6f1e4; -webkit-overflow-scrolling: touch; }
.thumbs img, .gallery .thumbs img { width: 54px; height: 54px; object-fit: cover; border-radius: 7px; border: 2px solid transparent; flex: none; }
.thumbs img.on, .gallery .thumbs img.on { border-color: var(--gold); }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13.5px; }
.spec b { color: var(--grey); font-weight: 400; }
.cdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--red); }
.cdown.soon { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.bidbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  max-width: 540px; margin: 0 auto; display: flex; gap: 8px; align-items: center;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  background: #fbf7ec; border-top: 1px solid var(--line);
}
.bidbar .p { flex: 1; min-width: 0; }
.bidbar .p b { color: var(--red); font-size: 19px; }
.blist { font-size: 13.5px; }
.blist .b { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.blist .b:last-child { border-bottom: 0; }
.blist .b .n { flex: 1; min-width: 0; }
.blist .b .a { font-variant-numeric: tabular-nums; font-weight: 600; }
.blist .b.top .a { color: var(--red); }

/* ---------- 弹层 ---------- */
.qp-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  max-width: 460px; width: calc(100% - 40px);
  background: rgba(34,58,48,.95); color: #f6f0de; padding: 10px 14px;
  border-radius: 10px; font-size: 14px; z-index: 90; display: none; text-align: center;
}
.qp-toast.err { background: rgba(150,30,24,.96); }
.qp-toast.ok { background: rgba(24,90,52,.95); }
.qp-busy { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.28); display: none; align-items: center; justify-content: center; }
.qp-busy-box { background: #fffdf7; border-radius: 12px; padding: 18px 22px; text-align: center; min-width: 130px; }
.qp-spin { width: 26px; height: 26px; margin: 0 auto 8px; border: 3px solid #e6dcc4; border-top-color: var(--gold-d); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.qp-busy-t { font-size: 13px; color: var(--ink2); }
.qp-sheet { position: fixed; inset: 0; z-index: 80; display: none; }
.qp-sheet.on { display: block; }
.qp-sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.qp-sheet-box {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 540px; margin: 0 auto;
  background: #fffdf7; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto; animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.qp-ask-t { font-size: 16px; font-weight: 600; text-align: center; margin: 4px 0 10px; }
.qp-tip { font-size: 12.5px; color: var(--grey); margin: 2px 0 6px; line-height: 1.5; }
/* 输入框**后面**那行小字(直径/厚度写「最小值」) */
.qp-min { font-size: 12.5px; color: var(--grey); margin: 3px 0 6px; }

/* ---------- 管理端 ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: 12.5px; color: var(--grey); }
.stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.arow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.arow:last-child { border-bottom: 0; }
.arow .g { flex: 1; min-width: 0; }
.arow .g .t { font-size: 14.5px; font-weight: 600; }
.arow .g .m { font-size: 12px; color: var(--grey); margin-top: 2px; }
.arow .qp-btn { flex: none; }   /* 按钮不许被长名字挤扁 */

/* ---------- 出价/买家明细行 ---------- */
.brow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.brow:last-child { border-bottom: 0; }
.brow .grow { flex: 1; min-width: 0; }
.brow .t { font-size: 14px; font-weight: 600; }
.brow .m { font-size: 11.5px; color: var(--grey); margin-top: 1px; }
.brow .amt { font-weight: 700; color: var(--red); font-size: 15px; white-space: nowrap; }
.brow .qp-btn { flex: none; }
.brow.dead { opacity: .45; }
.brow.dead .amt { text-decoration: line-through; color: var(--grey); }
.brow.bad { opacity: .6; }

/* 成交清单里的小图 */
.mini { width: 54px; height: 54px; flex: none; border-radius: 8px; object-fit: cover; background: #efe8d6; }
.card.done { background: #f4f9f5; border-color: #bcd9c6; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.imgs .im { position: relative; aspect-ratio: 1/1; border-radius: 9px; overflow: hidden; background: #efe8d6; border: 1px solid var(--line); }
.imgs .im img { width: 100%; height: 100%; object-fit: cover; }
.imgs .im .x { position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; line-height: 18px; text-align: center;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; font-size: 14px; }
.imgs .im .c { position: absolute; left: 0; bottom: 0; right: 0; background: rgba(34,58,48,.8); color: #f3ecd8; font-size: 11px; text-align: center; }
.imgs .add { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--gold); color: var(--gold-d); font-size: 26px; border-radius: 9px; aspect-ratio: 1/1; background: #fdf8ec; }
.locked { background: #f6f1e4; border: 1px dashed var(--gold); color: var(--gold-d); font-size: 12.5px; padding: 7px 10px; border-radius: 9px; margin: 8px 0; line-height: 1.5; }
.empty { text-align: center; color: var(--grey); padding: 40px 20px; font-size: 14px; }
.loginbox { max-width: 340px; margin: 18vh auto 0; padding: 0 20px; }
.loadmore { text-align: center; padding: 6px 0 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--grey); font-weight: 400; font-size: 12px; }
.notice { background: #fdf3d8; border: 1px solid var(--gold); color: #6b5210; font-size: 12.5px; padding: 8px 10px; border-radius: 9px; margin-bottom: 10px; line-height: 1.5; }
/* 一批多枚(数量>1): 紧贴价格下面说清楚"这一批是几枚" */
.lot { margin-top: 8px; padding: 7px 10px; border-radius: 9px; background: #fdf3d8;
       border: 1px solid var(--gold); color: #6b5210; font-size: 13px; line-height: 1.45; }

/* ---------- 二维码分享卡 ---------- */
/* 白底、描边、不压缩: 扫码靠的是方格边缘的明暗对比, 背景色和圆角都会让识别变难 */
.qrbox { display: inline-block; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.qrbox canvas { display: block; max-width: 100%; height: auto; }
.qr-none { color: var(--red); font-size: 13px; padding: 18px 6px; }
.qrname { font-size: 19px; line-height: 1.35; margin-top: 10px; }
.qrsn { font-size: 14px; color: var(--gold-d); letter-spacing: .5px; margin-top: 2px; }
.qrcode2 { font-size: 12.5px; color: var(--grey); margin-top: 1px; }

/* ---------- 「我的藏品」列表的管理模式(勾着删) ---------- */
/* 标题栏放两个按钮时不能让两个都去抢 auto 外边距 —— 那样会各分一半空隙、按钮飘到中间 */
.qp-head .qp-hbtn + .qp-hbtn { margin-left: 8px; }
.pcard .pick { width: 22px; height: 22px; flex: none; align-self: center; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; text-align: center;
  font-size: 14px; line-height: 19px; color: transparent; }
/* 勾用文字颜色藏起来(选中才显白), 不靠 ::after —— 老 WebView 上少一层赌注 */
.pcard.on { border-color: var(--red); background: #fff8f6; }
.pcard.on .pick { border-color: var(--red); background: var(--red); color: #fff; }
.mbar { position: fixed; left: 0; right: 0; z-index: 39; max-width: 540px; margin: 0 auto;
  bottom: calc(var(--tabh) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: #fbf7ec; border-top: 1px solid var(--line); }
.mbar .qp-btn { flex: 1; }
.mbar .qp-btn.ghost { flex: none; }
.mspace { height: 54px; }        /* 管理条是浮在底下的, 末尾留出它的高度 */

/* ---------- 拍照对版(康熙通宝) ---------- */
.dui-priv { margin-top: 8px; padding: 7px 10px; border-radius: 9px;
  background: #eef5ef; border: 1px solid #cfe0d4; color: #245a3c; font-size: 12.5px; }
.dui-hint { font-size: 12.5px; color: var(--ink2); line-height: 1.6; margin-bottom: 10px; }
.dui-slots { display: flex; gap: 10px; }
.dui-slots canvas { flex: 1; min-width: 0; width: 50%; aspect-ratio: 1/1; height: auto;
  border-radius: 12px; border: 1px solid var(--line); background: #efe8d6; cursor: pointer; }
.dui-cap { display: flex; gap: 10px; margin: 4px 0 12px; }
.dui-cap span { flex: 1; text-align: center; font-size: 12.5px; color: var(--grey); }
.dui-r .dui-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink);
  color: #f3ecd8; font-size: 12.5px; line-height: 22px; text-align: center; }
.dui-im { flex: 1; min-width: 0; width: 50%; aspect-ratio: 1/1; height: auto; border-radius: 9px;
  border: 1px solid var(--line); background: #efe8d6; image-rendering: auto; }
.dui-bar { height: 5px; border-radius: 3px; background: #efe8d6; margin-top: 9px; overflow: hidden; }
.dui-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-d)); }
/* 首页入口卡(在搜索框下、拍品列表上; 不 sticky —— 顶栏和"管理"浮条已经在抢位置了) */
.dui-entry { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0;
  padding: 11px 13px; border-radius: 12px; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, #fffdf7, #f6efdf); border: 1px solid var(--line); }
.dui-entry .dui-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; text-align: center;
  line-height: 32px; font-size: 19px; color: var(--gold-d); border: 1.5px solid var(--gold); }
.dui-entry b { display: block; font-size: 14.5px; color: var(--ink); }
.dui-entry em { display: block; font-style: normal; font-size: 12px; color: var(--grey); margin-top: 2px; }
.dui-entry .dui-go { flex: none; color: var(--gold-d); font-size: 20px; }
/* 第三方入口(全鉴): 虚线边 + 灰图标, 一眼能看出是"点出去"的外部服务, 不跟自家的对版混在一起 */
.dui-entry.dui-th { border-style: dashed; background: #fdfcf8; }
.dui-entry.dui-th .dui-ico { color: var(--grey); border-color: var(--line); }
.dui-entry.dui-th .dui-go { color: var(--grey); }
