:root {
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #262239; background: #f6f5fa;
  --ink: #262239; --muted: #645f76; --line: #e6e2ee; --accent: #65588d;
  --dark: #493d70; --white: #fff; --tint: #f0edf8; --input: #f8f7fb;
  --shadow: 0 3px 8px #2f225204, 0 15px 34px #2f225207;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .54; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.22rem; line-height: 1.4; }
.wrap { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.shell { background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px #34275105; }
.bar, nav, .section-top, .summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.bar { min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--dark); font-weight: 750; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--dark); color: var(--white); }
nav { font-size: .94rem; }
nav > a:not(.outline) { padding: .45rem .7rem; color: var(--dark); }
nav > a:not(.outline):hover { text-decoration: underline; }
.storefront { padding: clamp(1.2rem, 4vw, 2.8rem) 0 2.5rem; }
.purchase-layout {
  --purchase-caption-size: .875rem;
  font-size: .9375rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "intro checkout" "description checkout" "help checkout";
  align-content: start; gap: 1rem 1.3rem;
}
.intro, .panel { border-radius: 18px; }
.intro {
  grid-area: intro; position: relative; isolation: isolate; overflow: hidden;
  color: var(--white); background: linear-gradient(140deg, #392e5a, #57447d 68%, #69588d);
  box-shadow: 0 16px 35px #3529532b; padding: clamp(1.35rem, 3.5vw, 2.45rem);
}
.intro::after {
  content: ""; position: absolute; z-index: -1; bottom: -8rem; right: -8rem;
  width: 22rem; aspect-ratio: 1; border-radius: 50%; border: 1px solid #f0e7ff33;
  box-shadow: 0 0 0 25px #f0e7ff13, 0 0 0 52px #f0e7ff0d, 0 0 0 78px #f0e7ff08;
}
.intro-label { color: #e3d8fa; font-weight: 650; font-size: var(--purchase-caption-size); letter-spacing: .08em; }
.intro h1 { margin: .48rem 0 .85rem; font-size: clamp(2.15rem, 4.8vw, 3.75rem); line-height: 1.09; letter-spacing: -.045em; }
.intro p:not(.intro-label) { color: #eae3f6; }
.intro-footer { margin-top: 1rem; display: flex; align-items: center; gap: .5rem; color: #f4eefb; font-size: var(--purchase-caption-size); }
.intro-footer span { width: 8px; height: 8px; background: #cdb9f8; border-radius: 50%; box-shadow: 0 0 0 4px #cdb9f833; }
.ticket {
  position: absolute; z-index: -1; right: 10%; top: 34%; width: 32%; max-width: 11.5rem; aspect-ratio: 1.49;
  display: grid; align-items: center; transform: rotate(-12deg); border-radius: 14px;
  border: 1px solid #eee4ffad; background: linear-gradient(145deg, #e7dafa, #b49bdc);
  color: #49366a; box-shadow: 0 12px 30px #2015346b, 11px 14px 0 #ddccff30;
}
.ticket::after { content: ""; position: absolute; inset: 0 21% 0 auto; border-left: 1px dashed #796399; }
.ticket span { padding-left: 17%; font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.25rem, 3.5vw, 2.55rem); font-weight: 750; letter-spacing: -.04em; }
.demo-tag { background: var(--tint); color: var(--dark); padding: .2rem .6rem; border-radius: 5px; width: fit-content; font-size: .8rem; font-weight: 650; }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.purchase, .detail, .login-panel { padding: clamp(1.1rem, 3vw, 1.85rem); }
.purchase { grid-area: checkout; }
.purchase-heading { align-items: start; }
.purchase #buy-form { font-size: 1rem; }
.purchase .demo-tag { margin-top: .72rem; }
.status, .order-status { display: inline-block; justify-self: start; background: var(--tint); border-radius: 999px; color: var(--dark); padding: .2rem .65rem; font-size: .81rem; font-weight: 650; white-space: nowrap; }
.purchase .demo-tag, .purchase .status { font-size: var(--purchase-caption-size); }
.order-status.paid { color: #166245; background: #e6f4ed; }
.order-status.pending, .order-status.review, .status.unavailable { color: #75431f; background: #f9eddf; }
.order-status.closed { color: var(--muted); background: var(--input); }
.checkout-price { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .65rem; margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; background: var(--tint); }
.price-caption, #checkout-unit { font-size: var(--purchase-caption-size); color: var(--dark); }
.price { margin-top: .15rem; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 780; font-variant-numeric: tabular-nums; color: var(--dark); }
.muted { color: var(--muted); }
.purchase-note { font-size: var(--purchase-caption-size); margin-top: .65rem; }
.details-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 1.1rem; margin-top: 1.1rem; }
.detail > p, .detail > form { margin-top: .65rem; }
.field { display: grid; gap: .35rem; font-weight: 650; }
.field :is(input, textarea) { font-weight: 400; }
.checkout-contact { margin-top: .8rem; }
.checkout-contact + .purchase-note { margin-top: .3rem; }
.checkout-note { margin-top: .8rem; }
.checkout-quantity { margin: 1rem 0; }
.checkout-quantity input { max-width: 8rem; }
.offer { margin-top: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.offer h3 { font-size: 1rem; }
#price-tiers { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .47rem 0 0; list-style: none; }
#price-tiers li { border: 1px solid var(--line); padding: .32rem .55rem; background: var(--input); border-radius: 7px; color: var(--dark); font-size: var(--purchase-caption-size); }
.description-panel { grid-area: description; }
#contact { grid-area: help; }
.contact { display: flex; align-items: center; justify-content: space-between; gap: .65rem; color: var(--dark); padding: .55rem 0 0; border-top: 1px solid var(--line); font-size: var(--purchase-caption-size); }
.contact strong { display: block; color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.contact button { font-size: 1rem; }
.primary, .outline, .close { display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; min-height: 44px; border-radius: 9px; border: 1px solid transparent; font-weight: 650; white-space: nowrap; }
.primary { background: var(--accent); color: var(--white); box-shadow: 0 3px 9px #493d7024; }
.primary:hover:not(:disabled) { background: var(--dark); }
.outline, .close { background: var(--white); color: var(--dark); border-color: var(--line); }
.outline:hover:not(:disabled), .close:hover { background: var(--tint); }
.wide { width: 100%; margin-top: .75rem; }
#buy { min-height: 50px; margin-top: 1rem; }
.inline { display: flex; align-items: end; gap: .5rem; }
.fill { flex: 1; min-width: 0; }
input:not([type="radio"]), textarea, select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: .5rem .75rem; background: var(--input); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
.feedback { color: #805023; padding-top: .5rem; }
.feedback:empty { display: none; }
dialog { width: min(505px, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.15rem, 4vw, 1.6rem); color: var(--ink); background: var(--white); box-shadow: 0 20px 60px #25213d55; }
dialog::backdrop { background: #2420338c; }
.close { min-width: 42px; padding: 0; font-size: 1.4rem; }
.summary { padding-block: .7rem .35rem; border-bottom: 1px solid var(--line); }
.order-number { font-size: .87rem; overflow-wrap: anywhere; margin-top: .4rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 650; margin-bottom: .35rem; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(136px, 100%), 1fr)); gap: .5rem; }
.payment-option { padding: .55rem .6rem; display: flex; align-items: center; gap: .42rem; border: 1px solid var(--line); border-radius: .55rem; cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--accent); background: var(--tint); }
input[type="radio"] { accent-color: var(--accent); }
.payment-qr { display: block; width: min(210px, 100%); margin: .6rem auto 0; image-rendering: pixelated; }
.alipay-payment-frame { display: block; width: min(250px, 100%); height: 250px; margin: .6rem auto 0; border: 0; }
.qr-caption { text-align: center; font-size: .92rem; color: var(--muted); }
.login-panel { margin-inline: auto; width: min(420px, 100%); border-top: 4px solid var(--accent); }
.stack { display: grid; gap: .7rem; justify-items: start; }
.stack label { display: grid; gap: .3rem; width: 100%; }
.login-panel .stack { margin-top: 1rem; }
.login-panel .primary { width: 100%; }
.admin-title h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); }
.admin-title .demo-tag { margin: 0; }
.sales-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: .9rem 0 1rem; }
.sales-totals > div { padding: clamp(.65rem, 2vw, 1.15rem); border-top: 3px solid var(--accent); }
.sales-totals dt { color: var(--muted); font-size: .85rem; }
.sales-totals dd { margin: .2rem 0 0; color: var(--dark); font-size: clamp(.9rem, 3vw, 1.65rem); font-weight: 720; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sales-panel { margin-bottom: 1rem; }
.sales-heading { flex-wrap: wrap; }
.sales-caption { margin-top: .4rem; font-size: .84rem; }
.sales-ranges { display: inline-flex; gap: .2rem; padding: .2rem; border-radius: 10px; background: var(--tint); }
.sales-ranges button { padding: .32rem .6rem; border: 0; border-radius: 8px; background: transparent; color: var(--dark); font-size: .84rem; }
.sales-ranges button[aria-pressed="true"] { background: var(--dark); color: var(--white); }
.sales-plot { --sale-axis-height: 1.55rem; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem; margin-top: 1rem; }
.sales-scale { display: flex; flex-direction: column; justify-content: space-between; align-items: end; padding-bottom: var(--sale-axis-height); color: var(--muted); font-size: .68rem; line-height: 1; }
.sales-bars { position: relative; display: grid; grid-template-columns: repeat(var(--period-count, 7), minmax(0, 1fr)); height: clamp(9rem, 25vw, 14rem); }
.sales-bars::before { content: ''; position: absolute; inset: 0 0 var(--sale-axis-height); border-block: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%); pointer-events: none; }
.sales-column { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) var(--sale-axis-height); background: transparent; border: 0; padding: 0; color: var(--muted); min-width: 0; }
.sales-track { display: flex; align-items: end; justify-content: center; min-height: 0; }
.sales-bar { width: min(60%, 1.8rem); border-radius: .38rem .38rem 0 0; background: var(--accent); }
.sales-column:is(:hover, :focus-visible) .sales-bar { background: var(--dark); }
.sales-period { align-self: end; text-align: center; font-size: clamp(.6rem, 2vw, .78rem); white-space: nowrap; }
@media (max-width: 430px) { .sales-month-unit { display: none; } }
.sales-selection { text-align: center; color: var(--dark); margin-top: .75rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-block: .8rem; }
.metrics p { background: var(--tint); border-radius: 10px; display: grid; align-content: start; padding: .6rem .65rem; }
.metrics p span { font-size: .82rem; color: var(--dark); }
.metrics strong { color: var(--dark); font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.orders-panel { margin-top: 1.1rem; }
.payment-statuses { display: flex; flex-wrap: wrap; gap: .65rem 1.3rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.payment-statuses li { display: flex; align-items: center; gap: .55rem; }
.filters { display: flex; align-items: end; gap: .55rem; flex-wrap: wrap; }
.filters label { display: grid; }
.order-page-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; border: 0; border-top: 1px solid var(--line); padding: .85rem 0 0; margin: .85rem 0 0; min-width: 0; }
#order-page-summary { margin-inline-end: auto; font-size: .85rem; white-space: nowrap; }
.order-page-group, .order-page-controls label { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
.order-page-controls label { font-size: .9rem; }
.order-page-controls .outline { padding-inline: .65rem; }
.order-page-controls input { width: 4.2rem; text-align: center; padding-inline: .25rem; }
.order-page-controls select { padding-inline: .45rem; }
@media (max-width: 700px) { #order-page-summary { flex-basis: 100%; } }
.coupon-actions { display: flex; gap: .4rem; }
.coupon-delete { color: #a2394d; border-color: #ead1d9; }
.coupon-delete:hover:not(:disabled) { background: #faf0f3; }
.refund-details { display: grid; gap: .35rem; margin: .9rem 0; }
.refund-details > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; }
.refund-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.refund-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.order-refund-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.order-lines .refund-query-feedback { font-size: .76rem; line-height: 1.45; }
.refund-query-feedback:empty { display: none; }
.filters label:first-child { flex: 1 1 235px; min-width: 0; }
.table-scroll { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; text-align: left; width: 100%; }
th, td { padding: .65rem .7rem; border-bottom: 1px solid var(--line); font-size: .85rem; white-space: nowrap; }
th { color: var(--dark); background: var(--tint); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--input); }
.empty-orders td { color: var(--muted); text-align: center; padding: 1.55rem .7rem; }
.order-lines { display: grid; gap: .2rem; }
.order-lines small { color: var(--muted); font-size: .83rem; }
.order-contact small { max-width: 16rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.order-link { color: var(--dark); text-decoration: underline; text-underline-offset: .18em; }
.order-table-frame { margin-top: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.order-table { table-layout: fixed; }
.order-col-number { width: 22%; }
.order-col-kind, .order-col-pickup { width: 7%; }
.order-col-product { width: 16%; }
.order-col-amount { width: 7%; }
.order-col-contact { width: 11%; }
.order-col-status { width: 20%; }
.order-col-actions { width: 10%; }
.order-table th, .order-table td { padding: .62rem clamp(.32rem, .75vw, .65rem); white-space: normal; overflow-wrap: anywhere; }
.order-table th:first-child { border-top-left-radius: 9px; }
.order-table th:last-child { border-top-right-radius: 9px; }
.order-table .order-lines { grid-template-columns: minmax(0, 1fr); }
.order-table .order-status { white-space: normal; padding-inline: .45rem; }
.order-table .order-time { font-size: .79rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-table .outline { white-space: normal; padding-inline: .55rem; max-width: 100%; }
.order-field-label { display: none; }
@media (max-width: 800px) {
  .order-table-frame { border: 0; }
  .order-table, .order-table tbody { display: block; }
  .order-table colgroup { display: none; }
  .order-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .order-table tbody { display: grid; gap: .65rem; }
  .order-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; padding: .35rem .55rem; }
  .order-table tbody td { display: block; border-bottom: 0; padding: .25rem .35rem; }
  .order-table tbody td:first-child, .order-table tbody td:last-child { grid-column: 1 / -1; }
  .order-field-label { display: block; color: var(--muted); font-size: .77rem; }
  .order-table .empty-orders td { padding: .8rem .4rem; }
}
@media (max-width: 380px) { .order-table tbody td:nth-child(7) { grid-column: 1 / -1; } }
.order-page { width: min(780px, calc(100% - 3rem)); display: grid; gap: 1rem; }
.order-page h1 { color: var(--dark); font-size: clamp(1.65rem, 4vw, 2.25rem); }
.lookup-panel { background: linear-gradient(145deg, #f0ebf9, var(--white) 78%); border-top: 4px solid var(--accent); }
.lookup-panel > form { margin-top: 1rem; }
.lookup-panel input { background: var(--white); }
.order-results { display: grid; gap: 1rem; }
.order-results:empty { display: none; }
.order-details { display: grid; gap: .55rem; margin-block: .85rem; font-size: .875rem; }
.order-details > div { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .5rem; }
.order-details dt { color: var(--muted); text-align: left; }
.order-details dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.code-title { font-size: 1rem; margin: .85rem 0 .45rem; }
.code-list { display: grid; gap: .65rem; }
.copy-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .5rem; }
.code-value { display: block; align-content: center; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--input); font: .94rem/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: text; }
.code-list button { min-width: 4.4rem; }
.copy-line .outline.is-copied { background-color: var(--line); }
.usage-panel ol { margin: .65rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.usage-panel li::marker { color: var(--dark); font-weight: 750; }
.usage-panel li + li { margin-top: .45rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (width > 700px) {
  .purchase, .purchase #buy-form { display: flex; flex-direction: column; }
  .purchase #buy-form { flex: 1; }
  .checkout-note { margin-bottom: 1rem; }
  #buy { margin-top: auto; }
  .copy-line button { inline-size: calc(5em + 2rem + 2px); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 1.5rem); }
  .copy-line { grid-template-columns: minmax(0, 1fr); }
  .copy-line button { justify-self: stretch; }
  .code-value { padding-inline: .5rem; font-size: clamp(.75rem, 3.25vw, .94rem); }
  .order-details { font-size: .8125rem; }
  .purchase-layout, .details-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .purchase-layout { grid-template-areas: "intro" "checkout" "description" "help"; }
  .details-grid { margin-top: .75rem; }
  .ticket { top: 30%; right: 11%; width: min(27%, 7.5rem); }
  .bar { min-height: 60px; }
  nav a[href="#contact"] { display: none; }
}
@media (max-width: 370px) {
  .order-details { font-size: .78125rem; }
  .order-details > div { gap: .25rem; }
  .lookup-panel .inline { display: grid; }
  .lookup-panel .primary { width: 100%; }
  .ticket { right: 9%; }
}
