:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #f9fafb;
    --text: #171a21;
    --text-soft: #5d6470;
    --text-faint: #8a919e;
    --line: #e3e7ec;
    --line-strong: #cbd2db;
    --accent: #1769e0;
    --accent-soft: #edf4ff;
    --success: #14804a;
    --danger: #cc3344;
    --radius: 8px;
    --shadow: 0 12px 32px rgba(23, 26, 33, 0.07);
    --shadow-soft: 0 6px 18px rgba(23, 26, 33, 0.045);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.shell {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 246, 248, 0.94);
    backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-inner {
    min-height: 62px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 6px;
    background: var(--text);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
    letter-spacing: 0;
}

.brand strong {
    font-size: 14px;
}

.brand small {
    margin-top: 1px;
    color: var(--text-faint);
    font-size: 10px;
}

.site-nav,
.footer-inner nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-nav a,
.footer-inner a {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 650;
}

.site-nav a:hover,
.footer-inner a:hover {
    color: var(--text);
}

.site-nav .nav-query {
    padding: 7px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
    padding-block: 48px 58px;
}

.product {
    min-width: 0;
    padding-top: 10px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.product h1 {
    margin: 12px 0 16px;
    font-size: 54px;
    line-height: 1.04;
    letter-spacing: 0;
}

.intro {
    max-width: 600px;
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.75;
}

.service-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 24px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
}

.service-status span,
.delivery-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.product-section {
    margin-top: 56px;
    border-top: 1px solid var(--line-strong);
    padding-top: 22px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading p,
.section-heading h2 {
    margin: 0;
}

.section-index {
    color: var(--text-faint);
    font-size: 11px;
    font-weight: 750;
}

.section-heading h2 {
    font-size: 17px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.feature-grid article {
    min-height: 104px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.feature-grid strong,
.license-list strong {
    font-size: 13px;
}

.feature-grid p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.7;
}

.license-list {
    border-top: 1px solid var(--line);
}

.license-list div {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 18px;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid var(--line);
}

.license-list span {
    color: var(--text-soft);
    font-size: 12px;
}

.checkout {
    position: sticky;
    top: 84px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.checkout[data-success="true"] {
    border-color: #83caa5;
}

.checkout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.checkout-header h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.delivery-state {
    color: var(--success);
    font-size: 11px;
    font-weight: 700;
}

.control-group {
    min-width: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.checkout-header + .control-group {
    margin-top: 22px;
}

.control-group legend,
.control-label,
.contact-group label {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 750;
}

.plan-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.plan-option {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.plan-option:last-child {
    border-bottom: 0;
}

.plan-option:hover {
    background: var(--surface-muted);
}

.plan-option:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.plan-option:disabled:hover {
    background: #fff;
}

.plan-option[aria-pressed="true"],
.plan-option.is-selected {
    box-shadow: inset 3px 0 0 var(--accent);
    background: var(--accent-soft);
}

.plan-option span,
.payment-option > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.plan-option strong,
.payment-option strong {
    font-size: 12px;
}

.plan-option small,
.payment-option small,
.contact-group > span {
    color: var(--text-faint);
    font-size: 10px;
}

.plan-option b {
    flex: 0 0 auto;
    font-size: 12px;
}

.contact-group label {
    margin-bottom: 3px;
}

.contact-group > span {
    display: block;
    margin-bottom: 9px;
}

.contact-group input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    outline: 0;
    padding: 0 12px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
}

.contact-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12);
}

.contact-group input[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-error,
.payment-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.5;
}

.payment-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.payment-option {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    padding: 9px 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.payment-option:hover {
    border-color: #9ba4b0;
    background: var(--surface-muted);
}

.payment-mark {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
}

.alipay .payment-mark {
    background: #eaf3ff;
    color: #1677ff;
}

.wechat .payment-mark {
    background: #e9f8ef;
    color: #07a951;
}

.qr-area {
    text-align: center;
}

.qr-stage {
    position: relative;
    display: grid;
    min-height: 220px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
}

.qr-image {
    display: grid;
    width: 200px;
    height: 200px;
    place-items: center;
    overflow: hidden;
    background: #fff;
}

.qr-image iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.qr-stage[data-dimmed="true"] .qr-image {
    opacity: 0.12;
    filter: blur(5px);
}

.qr-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
}

.status-icon {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    place-items: center;
    border: 1px solid #f0b5bc;
    border-radius: 50%;
    background: #fff4f5;
    color: var(--danger);
    font-weight: 800;
}

.qr-status > strong {
    font-size: 13px;
}

.qr-status p {
    max-width: 240px;
    margin: 6px 0 14px;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.6;
}

.polling-tips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--text-soft);
    font-size: 11px;
}

.spinner {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 2px solid #cfd6df;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.large {
    width: 26px;
    height: 26px;
    border-width: 3px;
}

.countdown {
    margin: 10px 0 0;
    color: var(--text-faint);
    font-size: 10px;
}

.countdown strong {
    color: var(--accent);
    font-size: 11px;
}

.countdown strong[data-urgent="true"] {
    color: var(--danger);
}

.text-button,
.secondary-button {
    border: 0;
    cursor: pointer;
}

.text-button {
    margin-top: 13px;
    padding: 4px;
    background: transparent;
    color: var(--text-soft);
    font-size: 11px;
}

.text-button:hover {
    color: var(--accent);
}

.secondary-button {
    border-radius: 6px;
    padding: 9px 14px;
    background: var(--text);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-soft);
    font-size: 12px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(23, 105, 224, 0.22);
    outline-offset: 2px;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--text-faint);
}

.footer-inner {
    min-height: 68px;
}

.footer-inner p {
    margin: 0;
    font-size: 11px;
}

.footer-meta {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.footer-records {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
}

.footer-records a,
.police-record {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
}

.police-record img {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    object-fit: contain;
}

.footer-inner a {
    font-size: 11px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .page-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-top: 30px;
    }

    .product {
        padding-top: 0;
    }

    .checkout {
        position: relative;
        top: auto;
        grid-row: 1;
        width: min(100%, 540px);
        margin-inline: auto;
    }

    .product h1 {
        font-size: 44px;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 28px, 1120px);
    }

    .site-nav > a:not(.nav-query) {
        display: none;
    }

    .page-grid {
        gap: 34px;
        padding-block: 20px 44px;
    }

    .checkout {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        border-radius: var(--radius);
        padding: 18px 14px;
        box-shadow: var(--shadow-soft);
    }

    .product h1 {
        font-size: 38px;
    }

    .intro {
        font-size: 15px;
    }

    .product-section {
        margin-top: 42px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid article {
        min-height: auto;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding-block: 18px;
    }

    .footer-inner nav {
        flex-wrap: wrap;
        gap: 14px;
    }
}

@media (max-width: 420px) {
    .payment-list {
        grid-template-columns: 1fr;
    }

    .plan-option {
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
