:root {
    --bg: #f5f7fb;
    --bg-grid: rgba(18, 36, 29, 0.06);
    --surface: rgba(255, 255, 255, 0.84);
    --surface-strong: #ffffff;
    --ink: #0f1721;
    --muted: #4c6072;
    --line: rgba(15, 23, 33, 0.12);
    --line-strong: rgba(15, 23, 33, 0.2);
    --accent: #0f9f6e;
    --accent-deep: #0a6f52;
    --accent-soft: rgba(15, 159, 110, 0.12);
    --amber: #d97706;
    --cold: #2563eb;
    --shadow: 0 26px 60px rgba(24, 37, 56, 0.1);
    --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    --sans: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--sans);
    background:
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(15, 159, 110, 0.16), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef4f6 100%);
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
}

a {
    color: inherit;
}

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 10%, rgba(15, 23, 33, 0.3) 0 1px, transparent 1px);
    background-size: 32px 32px, 48px 48px;
}

.page-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    margin: 0 auto;
    padding: 44px 0 72px;
}

.page-shell--narrow {
    width: min(760px, calc(100% - 32px));
    max-width: calc(100% - 32px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(248, 251, 255, 0.76);
    border-bottom: 1px solid rgba(15, 23, 33, 0.08);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    width: min(1180px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    min-height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--mono);
    font-weight: 700;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 159, 110, 0.18), rgba(37, 99, 235, 0.14));
    color: var(--accent-deep);
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.nav-links a,
.nav-button {
    color: var(--muted);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 0.9rem;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(15, 159, 110, 0.12);
    color: var(--accent-deep) !important;
}

.nav-form {
    margin: 0;
}

.nav-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.message-stack {
    position: relative;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    margin: 18px auto 0;
}

.message {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 159, 110, 0.18);
    background: rgba(15, 159, 110, 0.08);
    color: var(--accent-deep);
}

.hero,
.status-strip,
.product-card,
.workflow-step,
.code-panel,
.narrative-card,
.faq-item {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 22px;
    align-items: stretch;
    padding: 26px;
    border-radius: 30px;
}

.hero-copy {
    padding: 14px 8px 10px;
}

.eyebrow,
.section-kicker,
.product-tag,
.code-header,
.step-no,
.window-bar,
.hero-points,
.status-item strong,
.pill {
    font-family: var(--mono);
}

.eyebrow,
.section-kicker {
    margin: 0 0 14px;
    color: var(--accent-deep);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.04em;
}

h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 6vw, 5.6rem);
    line-height: 0.92;
}

.lede,
.section-head p,
.product-card p,
.workflow-step p,
.narrative-card p,
.faq-item p {
    color: var(--muted);
    line-height: 1.8;
}

.lede {
    max-width: 58ch;
    margin: 22px 0 0;
    font-size: 1.06rem;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-points span,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font-size: 0.84rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: var(--mono);
    font-size: 0.94rem;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #20c38b 100%);
    color: #f7fffb;
    box-shadow: 0 16px 32px rgba(15, 159, 110, 0.22);
}

.button-secondary {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.75);
}

.terminal-window {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(6, 31, 23, 0.12);
    background: #0d1620;
    color: #d9f2eb;
    box-shadow: 0 26px 54px rgba(8, 24, 36, 0.28);
}

.window-bar {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(217, 242, 235, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.window-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff6b57;
}

.window-bar span:nth-child(2) {
    background: #ffbd2f;
}

.window-bar span:nth-child(3) {
    background: #28c840;
}

.terminal-body {
    padding: 20px 18px 22px;
    font-family: var(--mono);
    font-size: 0.92rem;
    line-height: 1.85;
}

.terminal-body p {
    margin: 0;
}

.terminal-body .prompt {
    color: #74f2bf;
}

.terminal-body .key {
    color: #86b5ff;
}

.terminal-body .value {
    color: #f5f7fb;
}

.terminal-body .ok {
    color: #74f2bf;
}

.terminal-body .gap {
    height: 12px;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 22px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(15, 23, 33, 0.08);
}

.status-item small {
    color: var(--muted);
}

.status-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(15, 159, 110, 0.12);
}

.section {
    margin-top: 56px;
}

.section-head {
    max-width: 720px;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.page-title,
.auth-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 0.96;
}

.section-head p:last-child {
    margin-top: 14px;
}

.product-grid,
.workflow-grid,
.faq-list {
    display: grid;
    gap: 18px;
}

.product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
    padding: 22px;
    border-radius: 22px;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.product-tag {
    color: var(--accent-deep);
    font-size: 0.88rem;
}

.pill {
    min-height: 30px;
    font-size: 0.78rem;
    background: var(--accent-soft);
    border-color: rgba(15, 159, 110, 0.2);
    color: var(--accent-deep);
}

.pill-alt {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.24);
    color: var(--amber);
}

.pill-cold {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.24);
    color: var(--cold);
}

.pill-disabled {
    opacity: 0.45;
}

.product-card h3,
.workflow-step h3,
.faq-item h3 {
    font-size: 1.45rem;
    line-height: 1.05;
}

.product-card p,
.workflow-step p,
.faq-item p,
.narrative-card p {
    margin: 14px 0 0;
}

.product-card ul {
    margin: 18px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.85;
}

.workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-step {
    padding: 22px;
    border-radius: 20px;
}

.step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(37, 99, 235, 0.14));
    color: var(--ink);
    font-size: 0.95rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: stretch;
}

.split-layout > * {
    min-width: 0;
    width: 100%;
}

.code-panel,
.narrative-card,
.faq-item {
    padding: 22px;
    border-radius: 22px;
}

.code-panel {
    overflow: hidden;
}

.code-header {
    margin-bottom: 12px;
    color: var(--accent-deep);
    font-size: 0.84rem;
}

.code-panel pre {
    margin: 0;
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 18px;
    border-radius: 16px;
    background: #101924;
    color: #d5e4f7;
    font-family: var(--mono);
    font-size: 0.92rem;
    line-height: 1.7;
}

.narrative-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.narrative-card h2 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
}

.faq-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-card,
.table-card {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border-radius: 24px;
}

.auth-card {
    padding: 24px;
}

.auth-card--wide {
    max-width: 860px;
}

.auth-copy,
.detail-summary,
.inline-meta,
.field-help {
    color: var(--muted);
    line-height: 1.75;
}

.auth-switch {
    margin-top: 16px;
    color: var(--muted);
}

.auth-note {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.08);
    color: var(--cold);
}

.auth-note strong {
    font-family: var(--mono);
    font-size: 0.88rem;
}

.auth-switch a,
.order-row a {
    color: var(--accent-deep);
}

.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field label {
    font-family: var(--mono);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    font: inherit;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.errorlist {
    margin: 0;
    padding-left: 18px;
    color: #b42318;
}

.button-block {
    width: 100%;
}

.inline-form {
    margin-top: 12px;
}

.empty-card {
    padding: 24px;
    border-radius: 22px;
    border: 1px dashed var(--line-strong);
    background: rgba(255, 255, 255, 0.6);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 18px;
}

.detail-panel {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.detail-panel--compact {
    display: grid;
    gap: 18px;
    align-content: start;
}

.workflow-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(15, 23, 33, 0.08);
}

.workflow-box h2,
.qr-box h2 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.workflow-box ol {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.9;
}

.rich-copy p:first-child {
    margin-top: 0;
}

.rich-copy p:last-child {
    margin-bottom: 0;
}

.qr-box {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(15, 23, 33, 0.08);
}

.payment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.qr-image,
.qr-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 18px;
    border: 1px dashed var(--line-strong);
    background: #fff;
}

.qr-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-family: var(--mono);
}

.order-submit {
    margin-top: 32px;
}

.payment-launch {
    display: grid;
    gap: 16px;
}

.payment-dialog {
    width: min(820px, calc(100vw - 24px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: rgba(248, 251, 255, 0.98);
}

.payment-dialog::backdrop {
    background: rgba(15, 23, 33, 0.58);
    backdrop-filter: blur(4px);
}

.payment-dialog__content {
    padding: 24px;
}

.payment-dialog__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.payment-dialog__close {
    min-height: 40px;
}

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.payment-method-card {
    min-height: 72px;
    padding: 16px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
    font-family: var(--mono);
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.payment-method-card:hover {
    transform: translateY(-1px);
}

.payment-method-card--active {
    border-color: rgba(15, 159, 110, 0.38);
    box-shadow: 0 12px 22px rgba(15, 159, 110, 0.12);
    background: rgba(15, 159, 110, 0.08);
    color: var(--accent-deep);
}

.payment-method-card--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.payment-panel {
    margin-top: 18px;
}

.payment-reminder {
    margin: 6px 0 0;
    color: var(--accent-deep);
    font-family: var(--mono);
    font-size: 0.92rem;
}

.table-card {
    padding: 18px;
}

.order-table__head,
.order-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 1fr 0.6fr;
    gap: 14px;
    align-items: start;
}

.order-table__head {
    padding: 0 12px 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.88rem;
}

.order-row {
    padding: 16px 12px;
    border-top: 1px solid rgba(15, 23, 33, 0.08);
}

.order-row__meta {
    grid-column: 1 / -1;
    color: var(--muted);
}

.order-row__meta p {
    margin: 8px 0 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.8rem;
}

.status-badge--pending_review {
    color: #9a6700;
    background: rgba(217, 119, 6, 0.12);
}

.status-badge--processing {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
}

.status-badge--staff_completed {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
}

.status-badge--completed {
    color: var(--accent-deep);
    background: rgba(15, 159, 110, 0.12);
}

.status-badge--rejected {
    color: #b42318;
    background: rgba(180, 35, 24, 0.12);
}

@media (max-width: 980px) {
    .hero,
    .product-grid,
    .workflow-grid,
    .split-layout,
    .faq-list,
    .status-strip,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    h1 {
        max-width: none;
    }

    .order-table__head {
        display: none;
    }

    .order-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .page-shell {
        width: min(1180px, calc(100% - 20px));
        max-width: calc(100% - 20px);
        padding-top: 18px;
        padding-bottom: 48px;
    }

    .site-header__inner {
        width: min(1180px, calc(100% - 20px));
        max-width: calc(100% - 20px);
        padding: 10px 0;
        align-items: flex-start;
    }

    .nav-links {
        justify-content: flex-end;
    }

    .hero,
    .status-strip,
    .product-card,
    .workflow-step,
    .code-panel,
    .narrative-card,
    .faq-item,
    .auth-card,
    .table-card,
    .detail-panel {
        border-radius: 18px;
    }

    .hero {
        padding: 18px;
    }

    .terminal-body {
        font-size: 0.84rem;
    }
}
