:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #142842;
  background: #f3f6fb;
  color-scheme: light;
  --ink: #142842;
  --muted: #4d617b;
  --line: #dce4ef;
  --accent: #2459c4;
  --surface: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.58; }
.shell { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .inline { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.header-inner { min-height: 4.5rem; justify-content: space-between; padding-block: .7rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; color: var(--ink); font-weight: 760; text-decoration: none; }
.brand small { color: var(--muted); font-size: .8rem; margin-left: .3rem; font-weight: 650; }
.mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: .55rem; background: var(--accent); color: #fff; }
nav { display: flex; gap: .5rem; flex-wrap: wrap; }
nav a { text-decoration: none; font-weight: 650; }
.site-nav { align-items: center; gap: .8rem; }
.site-nav a:not(.button) { padding: .45rem .35rem; }
a { color: var(--accent); text-underline-offset: .18em; }
a[aria-current="page"] { color: #193b83; background: #eaf0ff; border-radius: .4rem; }
main { min-height: 72vh; padding-block: 2.1rem 3rem; }
h1, h2, h3, p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7rem, 4.8vw, 2.65rem); line-height: 1.22; }
h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); line-height: 1.35; }
h3 { font-size: 1.06rem; }
p { color: var(--muted); }
.hero { background: linear-gradient(112deg,#102642,#173a66 70%,#24528b); color: #fff; border-radius: 1.1rem;
  display: grid; grid-template-columns: minmax(0,1.75fr) minmax(13rem,1fr); gap: 1rem; padding: clamp(1.25rem,4vw,3rem); margin-bottom: 1.7rem; }
.hero h1 { margin-bottom: .85rem; }
.hero p { color: #d4e2f7; max-width: 29rem; margin-bottom: 1.15rem; }
.hero .primary { background: #fff; color: #162e54; border-color: #fff; }
.hero .inverse { color: #fff; background: transparent; border-color: #98adc8; }
.hero-guide { background: #ffffff13; border: 1px solid #ffffff3d; border-radius: .8rem; padding: 1rem; align-self: center; }
.hero-guide h2 { font-size: 1rem; }
.hero-guide ol { margin: .25rem 0 0; padding-left: 1.45rem; }
.hero-guide li + li { margin-top: .4rem; }
.section-head, .spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.section-head span, .muted, .footer { color: var(--muted); font-size: .875rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,16rem),1fr)); gap: .9rem; }
.card { min-width: 0; background: var(--surface); padding: clamp(.95rem,2vw,1.35rem); border: 1px solid var(--line);
  border-radius: .85rem; box-shadow: 0 3px 14px #1b355008; overflow-wrap: anywhere; }
.card + .card, .help-card { margin-top: 1rem; }
.grid .card { margin: 0; }
.card p:last-child { margin-bottom: 0; }
.price-card .price { color: var(--ink); font-weight: 740; font-variant-numeric: tabular-nums; }
.price-card .tag { margin-bottom: .55rem; }
.tag { display: inline-block; padding: .16rem .55rem; border-radius: .35rem; color: #234b90; background: #edf2ff; font-size: .825rem; }
.price-card .muted { margin-bottom: .35rem; }
.lead { margin-bottom: 1rem; }
.page-narrow { max-width: 60rem; }
.notice, .feedback:not(:empty) { padding: .8rem .95rem; margin-bottom: .9rem; background: #e7efff; border: 1px solid #d1e1fb;
  color: #203d6c; border-radius: .6rem; overflow-wrap: anywhere; }
.account-layout, .admin-layout { display: grid; grid-template-columns: 12.25rem minmax(0,1fr); gap: 1rem; align-items: start; }
.account-content, .admin-content { min-width: 0; }
.account-nav { display: flex; flex-direction: column; padding: .55rem; border-radius: .7rem; border: 1px solid var(--line); background: white; }
.account-nav a { padding: .63rem .68rem; }
.account-nav a[aria-current] { color: #183e8a; }
.account-nav button { justify-content: flex-start; border-color: transparent; text-align: left; }
.admin-content section > .card + .card, .admin-content section > .grid + .card { margin-top: .9rem; }
.account-content .card:not([hidden]) + .card:not([hidden]) { margin-top: 1rem; }
.balance { background: #142e50; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.balance h2 { color: #cadbf3; font-size: .98rem; }
.balance p { color: #cadbf3; }
.balance strong { font-variant-numeric: tabular-nums; font-size: clamp(1.8rem,6vw,2.75rem); }
.balance .button:not(.primary), .balance button { background: #ffffff12; color: #fff; border-color: #a9b8ce; }
.balance .primary { background: #fff; color: #1c3a67; border-color: #fff; }
.auth-card { width: min(100%,30rem); }
#auth-form { display: grid; gap: .65rem; }
label { display: block; font-size: .9rem; font-weight: 650; }
input, select, button, .button { font: inherit; border-radius: .48rem; }
input, select { min-width: 0; width: 100%; min-height: 2.65rem; border: 1px solid #a6b6cc; padding: .5rem .7rem; color: var(--ink); background: #fff; }
label > input, label > select { display: block; margin-top: .28rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.65rem; padding: .45rem .75rem;
  color: var(--ink); background: #fff; border: 1px solid #a6b6cc; cursor: pointer; text-decoration: none; text-align: center; }
button:disabled { opacity: .57; cursor: wait; }
button.primary, .button.primary, button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid #4472d6; outline-offset: 2px; }
.mode { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .5rem; }
.inline > input { width: auto; flex: 1 1 8rem; }
.inline > button, .inline > .button { flex: 0 0 auto; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin: .5rem 0 1rem; }
.filter-bar label { min-width: min(100%,10rem); }
form.card > button, form.card > .button { margin: .75rem .35rem 0 0; }
form.card > label + label { margin-top: .6rem; }
.amount-summary { margin-block: .8rem .15rem; color: var(--ink); font-weight: 650; }
.records { list-style: none; margin: .65rem 0 0; padding: 0; }
.records li { border-top: 1px solid var(--line); padding: .7rem 0; overflow-wrap: anywhere; }
.records li > div { font-size: .9rem; color: var(--muted); margin: .15rem 0; }
.records li > button, .records li > .button { margin-top: .4rem; }
summary { cursor: pointer; padding-block: .35rem; color: var(--accent); font-weight: 650; }
#payment-qr { max-width: 100%; height: auto; display: block; margin-bottom: .7rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.footer { display: flex; flex-wrap: wrap; gap: .9rem; padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
.admin-metrics { margin-bottom: 1rem; }
.admin-metrics strong { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
@media(max-width: 46rem) {
  .hero { grid-template-columns: minmax(0,1fr); }
  .account-layout, .admin-layout { grid-template-columns: minmax(0,1fr); }
  .account-nav { flex-flow: row wrap; gap: .1rem .25rem; }
  .account-nav a { padding: .55rem .46rem; min-height: 2.65rem; }
}
@media(max-width: 35rem) {
  .shell { width: calc(100% - 1.25rem); }
  .header-inner { gap: .4rem; min-height: auto; }
  .brand { width: 100%; }
  .site-nav { gap: .5rem; }
  main { padding-block: 1rem 1.65rem; }
  .filter-bar label { flex: 1 1 8.5rem; min-width: 0; }
  .grid { grid-template-columns: minmax(0,1fr); }
  .checkout-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  input, select { font-size: 1rem; }
}
