/* 舞衣流转 (temporary name) — follows the WE DANCE visual language v1 (wd_brand.css, 2026-10-23):
   ink black + rehearsal-hall paper + one touch of stage red per screen, 14° forward lean on buttons/tags/bars,
   top-right cut corners on cards and photos, no gradients, no emoji icons, no large radii.
   All colours come from the --wd-* tokens so a WE DANCE theme change (e.g. the rose theme) carries over. */
:root {
  --bg: var(--wd-paper, #F5F2EC);
  --surface: var(--wd-white, #FFFFFF);
  --surface-2: var(--wd-line2, #ECE7DE);
  --ink: var(--wd-ink, #111111);
  --ink-2: var(--wd-ink2, #2B2825);
  --muted: var(--wd-mute, #6B665E);
  --muted-2: var(--wd-mute2, #A8A39A);
  --line: var(--wd-line, #DDD7CC);
  --stage: var(--wd-stage, #D42A17);
  --blush: var(--wd-blush, #F2DCD3);
  --gold: var(--wd-gold, #B8893B);
  --ok: var(--wd-ok, #2E7D4F);
  --ok-soft: #E3EFE7;
  --warn: #9A6A1F;
  --warn-soft: #F6ECD9;
  --bad: #B02A1A;
  --bad-soft: #F6DED9;
  --skew: var(--wd-skew, -14deg);
  --unskew: var(--wd-unskew, 14deg);
  --cut: 16px;
  --font: var(--wd-font, 'PingFang SC','Noto Sans SC','Hiragino Sans GB','Microsoft YaHei',-apple-system,system-ui,sans-serif);
  --font-en: var(--wd-font-en, 'Chakra Petch','Avenir Next Condensed','Arial Narrow',Arial,sans-serif);
  --nav-h: 56px;
  --safe: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--nav-h) + var(--safe) + 16px);
}
a { color: var(--ink); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin: 0 0 10px; }
h2 { font-size: 1.04rem; font-weight: 800; line-height: 1.35; margin: 0 0 8px; }
h3 { font-size: .95rem; font-weight: 800; line-height: 1.4; margin: 0 0 6px; }
p { margin: 0 0 .7em; }
.small { font-size: .8rem; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.en-font { font-family: var(--font-en); font-style: italic; font-weight: 700; letter-spacing: .04em; }
.num { font-family: var(--font-en); font-style: italic; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── top bar ── */
.topbar { max-width: 560px; margin: 0 auto; padding: 14px 20px 6px; display: flex; align-items: center; gap: 10px; }
.topbar .logo { height: 28px; width: auto; }
.topbar .title { display: flex; flex-direction: column; line-height: 1.15; }
.topbar .title b { font-size: 15px; font-weight: 800; }
.topbar .title span { font-family: var(--font-en); font-style: italic; font-weight: 600; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--stage); }
.topbar .spacer { flex: 1; }
.sq-btn { height: 34px; padding: 0 12px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; }
.sq-btn.en { font-family: var(--font-en); font-style: italic; }
.back-wd { font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }

main { max-width: 560px; margin: 0 auto; padding: 6px 20px 20px; }
.pilot-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface); border-left: 4px solid var(--gold); font-size: 12.5px; color: var(--ink-2); margin: 4px 0 14px; }

/* ── section header: red lean bar + zh title + en kicker ── */
.sech { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.sech:first-child { margin-top: 4px; }
.sech .bar { display: inline-block; width: 5px; height: 16px; background: var(--stage); transform: skewX(var(--skew)); flex: none; }
.sech h2 { margin: 0; font-size: 17px; }
.sech .en { font-family: var(--font-en); font-style: italic; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="en"] .sech .en { display: none; }
.sech .more { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }

/* ── cards: white, square, top-right cut ── */
.card { background: var(--surface); color: var(--ink); padding: 16px; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.card + .card { margin-top: 10px; }
.card.blush { background: var(--blush); }
.card.paper { background: var(--bg); border: 1px solid var(--line); }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* ── buttons: leaning background, upright text ── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 24px;
  font-family: var(--font); font-size: 15px; font-weight: 700; color: #fff; background: none; border: 0; cursor: pointer;
  isolation: isolate; text-decoration: none; white-space: nowrap;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: skewX(var(--skew)); z-index: -1; }
.btn.stage::before { background: var(--stage); }
.btn.ok::before { background: var(--ok); }
.btn.ghost { color: var(--ink); }
.btn.ghost::before { background: transparent; border: 2px solid var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger::before { background: transparent; border: 2px solid var(--bad); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn.xs { height: 32px; padding: 0 12px; font-size: 12px; }
.btn.block { width: calc(100% - 10px); margin-left: 5px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: default; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* ── tags: leaning background ── */
.tag {
  position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; margin-left: 3px; color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; isolation: isolate;
}
.tag::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: skewX(var(--skew)); z-index: -1; }
.tag.stage::before { background: var(--stage); }
.tag.gold::before { background: var(--gold); }
.tag.ok::before { background: var(--ok); }
.tag.ghost { color: var(--ink); }
.tag.ghost::before { background: transparent; border: 1.5px solid currentColor; }
.tag.mute { color: var(--muted); }
.tag.mute::before { background: var(--surface-2); }

/* ── forms ── */
label.field { display: block; }
label.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 0;
  padding: 10px 12px; min-height: 46px; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.form-grid.two { grid-template-columns: 1fr 1fr; }

/* ── browse ── */
.searchrow { display: flex; gap: 8px; }
.searchrow input { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; height: 32px; padding: 0 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 0; white-space: nowrap; }
.chip-btn.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
.filters select, .filters input { min-height: 40px; padding: 7px 10px; font-size: 13.5px; }
.listing-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lcard { background: var(--surface); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.lcard .ph { aspect-ratio: 4 / 5; background: var(--surface-2); position: relative; overflow: hidden; }
.lcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.lcard .ph .flag { position: absolute; left: 8px; bottom: 8px; }
.lcard .body { padding: 9px 11px 12px; display: flex; flex-direction: column; gap: 3px; }
.lcard .t { font-weight: 700; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.lcard .meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-family: var(--font-en); font-style: italic; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.orig { color: var(--muted-2); text-decoration: line-through; font-size: 12px; font-weight: 600; margin-left: 5px; font-family: var(--font-en); font-style: italic; }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); font-size: 14px; }

/* ── item page ── */
.gallery .main { aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; }
.thumbs button { border: 2px solid transparent; padding: 0; width: 58px; height: 70px; flex: none; cursor: pointer; background: var(--surface-2); border-radius: 0; }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.big-price { font-family: var(--font-en); font-style: italic; font-weight: 700; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
dl.specs { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: 14px; }
dl.specs dt { color: var(--muted); }
dl.specs dd { margin: 0; font-weight: 700; }
.seller-row { display: flex; align-items: center; gap: 12px; }
.ava { width: 44px; height: 44px; flex: none; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-en); font-style: italic; font-weight: 700; font-size: 20px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.qa-item { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.qa-item:first-child { border-top: 0; padding-top: 0; }
.qa-q b, .qa-a b { font-family: var(--font-en); font-style: italic; margin-right: 6px; }
.qa-q b { color: var(--stage); }
.qa-a { color: var(--ink-2); margin-top: 4px; }

/* ── sell ── */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-grid .slot { aspect-ratio: 4 / 5; background: var(--surface); position: relative; overflow: hidden; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; padding: 4px; line-height: 1.3; }
.photo-grid .slot.filled { border: 0; padding: 0; }
.photo-grid .slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .slot .x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border: 0; background: rgba(17,17,17,.7); color: #fff; cursor: pointer; font-size: 14px; line-height: 24px; padding: 0; }
.photo-grid .slot .lbl { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(17,17,17,.6); color: #fff; font-size: 10.5px; padding: 2px 0; }
.photo-add { cursor: pointer; }
.photo-add b { display: block; font-size: 22px; line-height: 1; color: var(--ink); margin-bottom: 4px; }

/* ── me / orders ── */
.acct { display: flex; align-items: center; gap: 14px; }
.acct .nm { font-size: 22px; font-weight: 800; line-height: 1.15; }
.tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1.5px solid var(--line); margin: 16px 0 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; white-space: nowrap; padding: 10px 14px 9px; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; }
.tabs a.on { color: var(--ink); }
.tabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1.5px; height: 4px; background: var(--stage); transform: skewX(var(--skew)); }
.tabs a .n { display: inline-block; min-width: 17px; height: 17px; padding: 0 4px; margin-left: 4px; background: var(--stage); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; font-family: var(--font-en); font-style: italic; }
.olist { background: var(--surface); }
.olist a.orow { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line2, var(--surface-2)); }
.olist a.orow:last-child { border-bottom: 0; }
.orow img, .orow .noimg { width: 52px; height: 64px; object-fit: cover; background: var(--surface-2); }
.orow .t { font-weight: 700; font-size: 14px; line-height: 1.35; }
.orow .s { font-size: 12px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { position: relative; padding: 0 0 14px 26px; color: var(--muted-2); }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 12px; height: 12px; background: var(--line); transform: skewX(var(--skew)); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 20px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--ink); }
.timeline li.now { color: var(--ink); font-weight: 800; }
.timeline li.now::before { background: var(--stage); }
.timeline li small { display: block; color: var(--muted); font-weight: 500; }
.callout { padding: 14px 16px; background: var(--surface); border-left: 4px solid var(--ink); font-size: 14px; }
.callout.stage { border-left-color: var(--ink); }
.callout.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.callout.warn { border-left-color: var(--gold); background: var(--warn-soft); }
.callout.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; font-size: 14px; }
.kv .k { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .02em; }
.code-big { font-family: var(--font-en); font-style: italic; font-weight: 700; font-size: 34px; letter-spacing: .14em; line-height: 1.1; }
.qr-box { background: #fff; padding: 10px; display: inline-block; }
.qr-box svg { width: 190px; height: 190px; display: block; }

/* ── notices ── */
.notice { padding: 12px 2px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.notice .dot { width: 8px; height: 8px; flex: none; margin-top: 7px; }
.notice.unread .dot { background: var(--stage); transform: skewX(var(--skew)); }
.notice .when { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── bottom nav: same as WeDance Pro (wd_nav.js v4) ── */
.wd-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe)); background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: flex-start; z-index: 40; padding: 0 0 var(--safe); }
.wd-nav a { position: relative; flex: 1; height: var(--nav-h); padding: 9px 0 0; display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.2; }
.wd-nav a svg { display: block; width: 22px; height: 22px; margin: 0 0 3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.wd-nav a.on { color: var(--ink); font-weight: 800; }
.wd-nav a.on::before { content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 4px; margin-left: -11px; background: var(--stage); transform: skewX(var(--skew)); }
.wd-nav .n { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; background: var(--stage); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-family: var(--font-en); font-style: italic; font-weight: 700; }

/* ── toast & sheet ── */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe) + 24px); background: var(--ink); color: #fff;
  padding: 11px 18px; font-size: 13.5px; font-weight: 700; z-index: 90; max-width: calc(100% - 40px); text-align: center; }
.toast.bad { background: var(--bad); }
.sheet-back { position: fixed; inset: 0; background: rgba(17, 17, 17, .45); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; border-top: 4px solid var(--stage); padding: 18px 20px calc(20px + var(--safe)); max-height: 88vh; overflow: auto; }
.sheet h2 { margin-bottom: 10px; }

/* ── print labels ── */
.label-sheet { background: #fff; color: #111; border: 2px dashed #888; padding: 16px; max-width: 340px; margin: 0 auto; }
.label-sheet .code-big { color: #111; font-size: 30px; }
@media print {
  body { background: #fff; padding: 0; }
  .topbar, .wd-nav, .no-print, .pilot-note { display: none !important; }
  main { padding: 0; }
}

/* ── front desk (desk.html, wider) ── */
body.desk main, body.desk .topbar { max-width: 980px; }
body.desk { padding-bottom: 24px; }
.desk-tabs { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 1.5px solid var(--line); margin: 6px 0 16px; }
.desk-tabs button { position: relative; border: 0; background: none; color: var(--muted); padding: 10px 16px 9px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.desk-tabs button.on { color: var(--ink); }
.desk-tabs button.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1.5px; height: 4px; background: var(--stage); transform: skewX(var(--skew)); }
.desk-tabs button .n { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; background: var(--stage); color: #fff; font-size: 11px; line-height: 18px; font-family: var(--font-en); font-style: italic; }
.scan-input { font-family: var(--font-en) !important; font-style: italic; font-weight: 700; font-size: 24px !important; letter-spacing: .14em; text-transform: uppercase; }
.desk-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 820px) { .desk-grid { grid-template-columns: 1fr 1fr; } }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
table.tbl th, table.tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 700; font-size: 12px; }
.tbl-wrap { overflow-x: auto; }
.thumbrow { display: flex; gap: 6px; overflow-x: auto; }
.thumbrow img { width: 88px; height: 108px; object-fit: cover; background: var(--surface-2); }
video.scanner { width: 100%; background: #000; }
