:root {
  color-scheme: light;
  --bg: #edf1fc;
  --surface: #fff;
  --well: #f5f7ff;
  --line: #dce3f2;
  --text: #192644;
  --muted: #526280;
  --accent: #5146ce;
  --accent-soft: #eceaff;
  --mint: var(--accent);
  --amber: #865506;
  --danger: #a52b47;
  --success: #1d6a58;
  --shadow: 0 14px 32px #29396910, 0 2px 6px #29396908;
  --gradient: linear-gradient(110deg, #2863d6, #6543cb);
  font-family: system-ui, "Microsoft YaHei UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 80% 3%, #f1edff 0, transparent 50%), var(--bg); }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, h1, h2, h3, dl, dd { margin: 0; }
.mono, code { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.home-shell, .service-shell, .buyer-shell, .lab-shell { width: min(calc(100% - 3rem), 1080px); margin: 0 auto; }
.service-shell, .buyer-shell { max-width: 790px; }
.page-toolbar, .topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.topbar { padding-inline: max(1.5rem, calc((100% - 1080px) / 2)); border-bottom: 1px solid var(--line); background: #ffffffa8; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 780; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--gradient); border-radius: 10px; }
.brand-mark svg { width: 19px; height: 19px; }
.tag, .status { display: inline-flex; align-items: center; gap: .42rem; padding: .36rem .63rem; border-radius: 999px; border: 1px solid #dedafb; color: #5144a8; background: #f7f5ff; font-size: .77rem; font-weight: 660; white-space: nowrap; }
.tag i, .status i, .eyebrow-dot { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eyebrow-dot { margin-right: .42rem; vertical-align: .11em; }
.page-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .43rem .68rem; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); font-size: .86rem; font-weight: 660; text-decoration: none; }
.page-back:hover { color: var(--accent); border-color: #b6b0ed; }
.service-banner, .panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.service-banner { padding: 1.5rem 1.25rem; margin-bottom: 1.2rem; text-align: center; background: linear-gradient(135deg, #fff, #f8f7ff); }
.home-banner { padding: 2rem 1.25rem 1.65rem; }
.eyebrow { margin-bottom: .5rem; color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .1em; }
.service-banner h1, .hero h1 { font-size: clamp(2rem, 4.8vw, 3rem); line-height: 1.18; font-weight: 810; letter-spacing: -.035em; }
.service-banner h1 { color: #4a46b4; }
.service-banner > p:last-of-type, .hero > p:last-child { margin: .65rem auto 0; color: var(--muted); line-height: 1.65; font-size: .92rem; }
.banner-rule { display: block; width: 64px; height: 4px; margin: 1rem auto 0; border-radius: 8px; background: var(--gradient); }
.panel { padding: 1.35rem; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding-bottom: .95rem; border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: 1.15rem; text-align: center; }
h2 { font-size: 1.18rem; line-height: 1.35; }
h3, dt, label { color: var(--muted); font-size: .84rem; font-weight: 680; }
.section-title > p, .form-heading > p { margin-top: .42rem; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.service-grid { display: grid; grid-template-columns: 1.12fr 1fr 1fr; gap: .8rem; }
.service-tile { min-height: 91px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; padding: .8rem; border: 1px solid #dedff6; border-radius: 12px; color: var(--text); background: var(--well); text-decoration: none; }
.service-tile:hover { border-color: #aea5f0; background: #efedff; }
.service-tile-primary { color: #fff; border-color: transparent; background: var(--gradient); }
.service-tile-primary:hover { border-color: transparent; background: linear-gradient(110deg, #2357bc, #5837b6); }
.tile-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--accent); background: #e8e7fb; }
.tile-icon svg { width: 21px; height: 21px; }
.service-tile-primary .tile-icon { color: #fff; background: #ffffff24; }
.tile-copy { min-width: 0; display: grid; gap: .3rem; }
.tile-copy > strong { font-size: 1rem; line-height: 1.2; }
.tile-copy > span { font-size: .78rem; line-height: 1.4; color: var(--muted); }
.service-tile-primary .tile-copy > span { color: #f3efff; }
.tile-arrow { color: var(--accent); font-size: 1.1rem; font-weight: 650; }
.service-tile-primary .tile-arrow { color: #fff; }
.service-help { margin-top: 1rem; color: var(--muted); font-size: .88rem; line-height: 1.65; }
.home-guide { margin-top: 1.2rem; scroll-margin-top: 1rem; }
.service-help h2, .service-help h3 { color: var(--text); }
.service-help details { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.service-help summary { cursor: pointer; color: var(--text); font-weight: 660; }
.service-help details p { margin-top: .35rem; padding-left: .8rem; }
.hero { padding: 2rem 0 1.35rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .48rem .8rem; border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; font-weight: 690; text-decoration: none; }
.primary { color: #fff; border-color: transparent; background: var(--gradient); }
.primary:hover:not(:disabled) { background: linear-gradient(110deg, #2357bc, #5837b6); }
.secondary, .button:not(.primary) { color: var(--text); background: var(--well); }
.secondary:hover:not(:disabled), .button:not(.primary):hover { color: var(--accent); border-color: #b4acec; }
.steps { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: 0 0 1.2rem; padding: 0 0 1.15rem; border-bottom: 1px solid var(--line); list-style: none; }
.steps li { display: flex; align-items: center; gap: .48rem; color: var(--muted); font-size: .84rem; line-height: 1.3; font-weight: 650; }
.steps li:not(:last-child)::after { content: ""; display: block; flex: none; width: clamp(.35rem, 3vw, 2rem); height: 1px; margin-left: .1rem; background: var(--line); }
.step-number { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); background: #edf0f7; font-variant-numeric: tabular-nums; }
.steps li[aria-current="step"] { color: var(--accent); font-weight: 760; }
.steps li[aria-current="step"] .step-number { color: #fff; background: var(--gradient); }
.steps li.done .step-number { color: var(--accent); background: var(--accent-soft); }
.workflow-panel { max-width: 100%; }
.redeem-form, .card-result { display: grid; gap: .7rem; }
.redeem-form label { margin-top: .15rem; }
.redeem-form input { width: 100%; min-height: 48px; padding: .62rem .75rem; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--well); }
.redeem-form input::placeholder { color: #5f6e88; }
.redeem-form .primary { min-height: 46px; }
.order-spec { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .75rem; border: 1px solid var(--line); border-radius: 9px; background: var(--well); font-size: .87rem; }
.order-spec > span { color: var(--muted); }
.workflow-actions, .buyer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.notice { margin-top: .95rem; padding: .64rem .75rem; border-left: 3px solid currentColor; border-radius: 4px 8px 8px 4px; color: var(--accent); background: var(--well); font-size: .85rem; line-height: 1.5; }
.notice[data-error="true"] { color: var(--danger); background: #fff3f6; }
.muted, footer { color: var(--muted); font-size: .83rem; line-height: 1.6; }
footer { padding: 1rem 0 1.4rem; text-align: center; }
.status { color: var(--muted); background: var(--well); border-color: var(--line); }
.status[data-state="waiting"], .status[data-state="release_pending"], .status[data-state="review"] { color: var(--amber); background: #fff6df; border-color: #f3e3bc; }
.status[data-state="received"] { color: var(--success); background: #ebf8f1; border-color: #cbe8d9; }
.status[data-state="invalid"], .status[data-state="offline"] { color: var(--danger); background: #fff1f4; border-color: #f2dce4; }
.buyer-content { display: grid; gap: .95rem; padding-top: 1rem; }
.value-row { display: flex; gap: .55rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.phone { font-size: clamp(1.23rem, 4.8vw, 1.82rem); font-weight: 710; overflow-wrap: anywhere; }
.copy { min-height: 36px; font-size: .8rem; }
.timer-block { padding-top: .75rem; border-top: 1px solid var(--line); }
#countdown { color: var(--amber); font-size: 1.06rem; font-weight: 740; }
progress { display: block; width: 100%; height: 7px; margin-top: .58rem; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); accent-color: var(--accent); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--gradient); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.code-block { padding: .7rem .8rem; border: 1px dashed #b8bce0; border-radius: 10px; background: var(--well); }
.code-block[data-ready="true"] { border-color: #94c7b1; border-style: solid; background: #edf9f3; }
.code { color: var(--success); font-size: clamp(1.5rem, 6vw, 2.05rem); letter-spacing: .09em; font-weight: 760; }
.code-block .muted { margin-top: .28rem; }
.buyer-actions { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 750px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-tile { min-height: 67px; }
}
@media (max-width: 430px) {
  .home-shell, .service-shell, .buyer-shell, .lab-shell { width: calc(100% - 1.5rem); }
  .topbar { padding-inline: .75rem; }
  .page-toolbar, .topbar { min-height: 58px; }
  .panel { padding: .9rem; border-radius: 14px; }
  .service-banner { padding-inline: .75rem; border-radius: 14px; }
  .steps { justify-content: space-between; gap: .27rem; }
  .steps li { gap: .3rem; font-size: .73rem; }
  .steps li:not(:last-child)::after { display: none; }
  .step-number { width: 24px; height: 24px; }
}
