:root {
  --paper: #f7f9f8;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #66717d;
  --line: #d9e0df;
  --jade: #087c68;
  --jade-dark: #075f52;
  --blue: #2f64b7;
  --amber: #c98520;
  --danger: #b63d3a;
  --success-soft: #e8f5f0;
  --shadow: 0 14px 36px rgba(23, 32, 42, 0.09);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: var(--jade-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, .button { min-height: 42px; }
:focus-visible { outline: 3px solid rgba(47, 100, 183, 0.28); outline-offset: 2px; }

.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - 1080px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 760; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; transform: rotate(45deg); }
.brand-mark span { background: var(--jade); border-radius: 2px; }
.brand-mark span:nth-child(2) { background: var(--blue); }
.brand-mark span:nth-child(3) { background: var(--amber); }
.brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 2px; }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a { color: var(--muted); text-decoration: none; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 36px auto 64px; }
.checkout-shell { width: min(920px, calc(100% - 32px)); margin: 28px auto 64px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.panel-body { padding: 28px; }
.panel + .panel { margin-top: 18px; }

.eyebrow { margin: 0 0 8px; color: var(--jade-dark); font-size: 12px; font-weight: 750; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.14; letter-spacing: 0; }
h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: 0; }
h3 { margin: 0; font-size: 16px; letter-spacing: 0; }
.lead { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero { padding: 42px 0 32px; border-bottom: 1px solid var(--line); }
.hero-rail { height: 8px; width: min(460px, 90%); margin-top: 30px; display: grid; grid-template-columns: 1.15fr .9fr .7fr; gap: 5px; }
.hero-rail span { border-radius: 2px; background: var(--jade); }
.hero-rail span:nth-child(2) { background: var(--blue); }
.hero-rail span:nth-child(3) { background: var(--amber); }

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 28px 0; background: var(--surface); }
.trust-item { padding: 22px; min-height: 130px; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item p { margin: 9px 0 0; color: var(--muted); line-height: 1.65; font-size: 14px; }

.order-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.order-title { margin: 4px 0 0; font-size: 23px; }
.order-no { color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.amount { white-space: nowrap; text-align: right; }
.amount strong { font: 700 34px ui-monospace, SFMono-Regular, Consolas, monospace; }
.amount small { display: block; color: var(--muted); margin-top: 5px; }

.channel-list { display: grid; gap: 10px; margin: 22px 0; }
.channel {
  width: 100%; min-height: 66px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; text-align: left; cursor: pointer;
}
.channel:hover { border-color: #a5b2af; }
.channel[aria-pressed="true"] { border-color: var(--jade); box-shadow: 0 0 0 2px rgba(8,124,104,.12); background: #fbfffd; }
.channel-icon { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; color: white; font-weight: 800; font-size: 13px; }
.channel-icon.wechat { background: #13a65a; }
.channel-icon.alipay { background: #1677ff; }
.channel-icon.bestpay { background: #ec6a2c; }
.channel small { color: var(--muted); display: block; margin-top: 3px; }
.radio-dot { width: 18px; height: 18px; border: 1.5px solid #a9b4b1; border-radius: 50%; padding: 3px; background-clip: content-box; }
.channel[aria-pressed="true"] .radio-dot { border-color: var(--jade); background-color: var(--jade); }

.button, button.primary {
  border: 0; border-radius: 6px; background: var(--jade); color: white; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; font-weight: 700;
}
.button:hover, button.primary:hover { background: var(--jade-dark); }
.button.secondary, button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: not-allowed; }
.pay-button { width: 100%; height: 50px; font-size: 16px; }
.notice { padding: 13px 15px; border-left: 3px solid var(--amber); background: #fff8eb; color: #684911; font-size: 13px; line-height: 1.6; }
.notice.error { border-color: var(--danger); background: #fff1f0; color: #712b29; }
.notice.success { border-color: var(--jade); background: var(--success-soft); color: var(--jade-dark); }

.side-facts { margin: 0; }
.side-facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.side-facts div:last-child { border-bottom: 0; }
.side-facts dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.side-facts dd { margin: 0; line-height: 1.55; font-size: 14px; }
.security-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; margin-top: 18px; }
.security-line::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 4px rgba(8,124,104,.12); }

.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
input, textarea, select { width: 100%; min-height: 42px; border: 1px solid #cbd5d2; border-radius: 6px; padding: 9px 11px; color: var(--ink); background: white; }
textarea { min-height: 90px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.actions.centered { justify-content: center; }
.admin-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 18px; }
.page-title-compact { font-size: 30px; }
.policy-title { font-size: 32px; }
.section-spaced { margin-top: 28px; }
.notice.spaced { margin-top: 18px; }
.login-shell { max-width: 480px; }
.form-spaced { margin-top: 24px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 18px; }
.stat span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 8px; font: 700 24px ui-monospace, SFMono-Regular, Consolas, monospace; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 650; background: #fafcfb; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: #eef1f1; color: #4e5b60; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.paid { background: var(--success-soft); color: var(--jade-dark); }
.status.pending { background: #fff6e5; color: #94610e; }
.status.failed, .status.closed { background: #fff0ef; color: var(--danger); }

.qr-wrap { display: grid; place-items: center; padding: 28px; }
.qr-wrap img { width: 280px; max-width: 100%; height: auto; image-rendering: crisp-edges; }
.center { text-align: center; }
.muted { color: var(--muted); }
.footer { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.8; display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 760px) {
  .topbar { padding: 0 16px; }
  .brand small, .topnav .hide-mobile { display: none; }
  .shell { width: min(100% - 28px, 1080px); margin-top: 22px; }
  .split { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .panel-body { padding: 20px; }
  .order-head { display: block; }
  .amount { text-align: left; margin-top: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .admin-head { align-items: flex-start; }
  .footer { display: block; width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
