:root {
  --red: #93514b;
  --red-dark: #764039;
  --cream: #f7f5f0;
  --paper: #fffefa;
  --ink: #393933;
  --muted: #7a7870;
  --line: #e5e2d9;
  --green: #2f7d58;
  --orange: #c66b22;
  --shadow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select, textarea { font: inherit; }
.shell { width: min(720px, 100%); margin: 0 auto; padding: 36px 24px 64px; }
.hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: start; padding: 12px 0 32px; }
.hero > div:last-child { min-width: 0; }
.brand-mark { width: 64px; height: 64px; border-radius: 50%; background: #f2e4ce; flex: none; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-weight: 400; letter-spacing: .04em; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; font-weight: 500; font-size: clamp(25px, 5vw, 31px); line-height: 1.4; letter-spacing: .035em; }
.hero p:last-child { color: var(--muted); font-size: 14px; line-height: 1.95; margin: 0; }
.wechat-contact { white-space: nowrap; user-select: text; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 26px; box-shadow: var(--shadow); }
.step-title { display: flex; gap: 12px; align-items: flex-start; }
.step-title > span { width: 28px; height: 28px; border-radius: 50%; background: #eeeae2; color: var(--muted); display: grid; place-items: center; font-weight: 500; font-size: 14px; flex: none; }
.step-title h2 { margin: 2px 0 4px; font-size: 18px; font-weight: 500; }
.step-title p { margin: 0; color: var(--muted); }
.products { display: grid; gap: 12px; margin: 20px 0; }
.history-row { display: block; margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.history-row:has(select[hidden]) { display: none; }
.history-row select { margin-top: 8px; background-color: transparent; font-size: 14px; }
.product { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 18px 16px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: transparent; }
.product.selected { border-color: #b99487; background: #faf6f0; }
.product input { width: 20px; height: 20px; accent-color: var(--red); }
.product strong { display: block; margin-bottom: 6px; font-weight: 500; }
.product small { color: var(--muted); line-height: 1.45; }
.product-price { color: var(--red); font-size: 20px; font-weight: 500; white-space: nowrap; }
.form-stack { display: grid; gap: 15px; }
.form-stack label { display: grid; gap: 9px; font-weight: 500; font-size: 14px; }
.form-stack small { color: var(--muted); font-weight: 400; line-height: 1.5; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 14px 15px; background: #fff; color: var(--ink); outline: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%237a7870' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; background-size: 16px; }
input::placeholder, textarea::placeholder { color: #96948d; font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(168, 47, 50, .1); }
textarea { min-height: 92px; resize: vertical; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 8px; border: 0; cursor: pointer; text-decoration: none; font-weight: 500; }
.button.primary { background: var(--red); color: white; box-shadow: none; }
.button.primary:hover { background: var(--red-dark); }
.button.secondary { background: #f4e9df; color: var(--red-dark); }
.button.text-button { width: 100%; margin-top: 10px; background: transparent; color: var(--muted); font-size: 13px; box-shadow: none; }
.button.text-button:hover { color: var(--red-dark); }
.button:disabled { opacity: .55; cursor: wait; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.order-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.order-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.status { border-radius: 6px; padding: 6px 10px; background: #f3f0e8; color: #8d7350; font-weight: 400; white-space: nowrap; font-size: 12px; }
.amount { font-size: 18px; }
.amount strong { color: var(--red); font-size: 26px; font-weight: 500; }
.notice { background: #f7f4ec; border-radius: 6px; padding: 13px 15px; line-height: 1.8; font-size: 14px; color: #81745e; }
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.qr-card { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: center; }
.qr-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 8px; border-radius: 10px; }
.qr-card strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.qr-placeholder { aspect-ratio: 1; display: grid; place-items: center; padding: 18px; margin-bottom: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--cream); color: var(--muted); }
.qr-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.compact { margin-top: 18px; }
.state-card { text-align: center; padding: 32px 22px; }
.state-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: #e0f2e8; color: var(--green); font-size: 29px; font-weight: 900; }
.state-card p { color: var(--muted); line-height: 1.65; }
.state-card.error .state-icon { background: #fde5e3; color: var(--red); }
.success-banner { display: flex; gap: 13px; padding: 17px; border-radius: 17px; background: #e8f6ee; margin-bottom: 15px; }
.success-banner > span { font-size: 31px; }
.success-banner h2 { margin: 0 0 4px; color: var(--green); }
.success-banner p { margin: 0; color: #486a58; }
.package { min-height: 48vh; line-height: 1.65; background: #fff; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.messages { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.messages h3 { font-size: 16px; font-weight: 500; }
.message-list { display: grid; gap: 9px; margin-bottom: 12px; }
.message { max-width: 88%; padding: 10px 12px; border-radius: 14px; line-height: 1.55; font-size: 14px; }
.message.buyer { justify-self: end; background: #f4e9df; }
.message.admin { background: #e7f1ff; }
.message small { display: block; margin-top: 4px; opacity: .6; }
.message-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.message-form textarea { min-height: 72px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(calc(100% - 32px), 520px); padding: 13px 16px; border-radius: 13px; background: #322b28; color: white; text-align: center; box-shadow: 0 10px 35px rgba(0,0,0,.25); z-index: 20; }
@media (max-width: 560px) {
  .shell { padding: 24px 18px 48px; }
  .hero { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 8px 0 26px; }
  .brand-mark { width: 48px; height: 48px; }
  .hero p:last-child { font-size: 13px; }
  .card { border-radius: 10px; padding: 20px 16px; }
  .product { grid-template-columns: 23px 1fr; }
  .product-price { grid-column: 2; }
  .qr-grid, .button-row { grid-template-columns: 1fr; }
  .message-form { grid-template-columns: 1fr; }
}
