/* ============================================================
   星屿发卡 · 前台样式（浅色简约版）
   白底 / 细边框 / 单一主色 / 系统字体，无渐变动效
   ============================================================ */

:root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-soft: #f8f9fb;
    --surface: #ffffff;
    --ink: #111827;
    --ink-2: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-2: #d1d5db;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff6ff;
    --ok: #15803d;
    --ok-soft: #f0fdf4;
    --warn: #b45309;
    --warn-soft: #fffbeb;
    --bad: #b91c1c;
    --bad-soft: #fef2f2;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
    --shadow-md: 0 8px 24px rgba(17, 24, 39, .07);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { color: var(--ink); font-weight: 700; }
.link { color: var(--brand); border-bottom: 1px dashed rgba(37, 99, 235, .4); }
.link:hover { color: var(--brand-dark); }
.grad-text { color: var(--brand); font-weight: 700; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ───────────── 顶栏 ───────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    flex: none;
}
.brand-text { font-size: 16px; }
.nav { display: flex; gap: 2px; margin-left: 4px; }
.nav-link {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink-2);
    transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.nav-link.is-active { color: var(--brand); background: var(--brand-soft); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ───────────── 按钮 ───────────── */
.btn {
    --btn-h: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: var(--btn-h);
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-glass { background: #fff; border-color: var(--line-2); color: var(--ink-2); }
.btn-glass:hover { border-color: var(--muted); color: var(--ink); }
.btn-ghost { color: var(--ink-2); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--bad-soft); border-color: #fecaca; color: var(--bad); }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { --btn-h: 34px; padding: 0 13px; font-size: 13px; }
.btn-xs { --btn-h: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { --btn-h: 48px; padding: 0 24px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-buy {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line-2);
    color: var(--ink);
}
.btn-buy:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ───────────── Hero ───────────── */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    padding-top: 64px;
    padding-bottom: 36px;
}
.hero-copy { max-width: 720px; }
.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font-size: 12.5px;
    color: var(--ink-2);
}
.pill .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22c55e;
}
.hero-title {
    margin-top: 18px;
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.16;
}
.hero-sub {
    margin-top: 14px;
    max-width: 56ch;
    color: var(--muted);
    font-size: 15.5px;
}
.hero-cta { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    gap: 40px;
    margin: 36px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.hero-stats dt { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats dd { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

.hero-art { display: none; }

/* ───────────── 公告 ───────────── */
.notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #fde68a;
    background: var(--warn-soft);
    color: var(--warn);
    font-size: 13.5px;
}
.notice-icon { font-size: 14px; line-height: 1.6; }

/* ───────────── 区块 ───────────── */
.section { padding-top: 56px; padding-bottom: 8px; }
#products { scroll-margin-top: 84px; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.section-title { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 700; }
.section-sub { margin-top: 5px; color: var(--muted); font-size: 13.5px; }
.pay-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
}

/* ───────────── 商品卡 ───────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.product-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.product-card.is-soldout { opacity: .7; }

[data-theme="violet"] { --g1: #eef2ff; --g2: #f5f3ff; }
[data-theme="cyan"] { --g1: #ecfeff; --g2: #eff6ff; }
[data-theme="rose"] { --g1: #fff1f2; --g2: #fff7ed; }
[data-theme="amber"] { --g1: #fffbeb; --g2: #fff7ed; }
[data-theme="emerald"] { --g1: #ecfdf5; --g2: #f0fdf4; }
[data-theme="indigo"] { --g1: #eef2ff; --g2: #f5f3ff; }

.cover {
    position: relative;
    height: 150px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    overflow: hidden;
}
.cover-emoji {
    position: relative;
    z-index: 2;
    font-size: 46px;
    line-height: 1;
}
.cover-emoji.has-icon { padding: 0; overflow: hidden; }
.cover-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.modal-emoji.has-icon { padding: 0; overflow: hidden; }
.cover-shine { display: none; }
.cover-tag {
    position: absolute;
    z-index: 3;
    left: 12px;
    top: 12px;
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--line);
    color: var(--ink-2);
}
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-title { font-size: 15px; font-weight: 600; }
.product-sub {
    font-size: 12.5px;
    color: var(--muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.product-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; margin-top: 2px; }
.stock {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--ok-soft);
    color: var(--ok);
    border: 1px solid #bbf7d0;
}
.stock.is-out { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }
.deliver { padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); border: 1px solid #dbeafe; }
.product-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { display: flex; align-items: baseline; gap: 2px; }
.price-cur { font-size: 13px; color: var(--brand); font-weight: 600; }
.price-num { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.price-num.xl { font-size: 36px; }
.price-origin { margin-left: 6px; font-size: 12px; color: var(--muted); text-decoration: line-through; }
.price-origin.lg { font-size: 14px; }
.save-tag {
    font-size: 11.5px;
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--bad-soft);
    color: var(--bad);
    border: 1px solid #fecaca;
}
.card-link { position: absolute; inset: 0; z-index: 4; }
.product-card .product-body { position: relative; z-index: 3; }
.product-card .btn-buy { position: relative; z-index: 5; }

/* ───────────── 特性 ───────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
}
.feature {
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
}
.feature-ico {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 17px;
    background: #fff;
    border: 1px solid var(--line);
    margin-bottom: 12px;
}
.feature h4 { font-size: 15px; margin-bottom: 6px; font-weight: 600; }
.feature p { font-size: 13px; color: var(--muted); }

/* ───────────── 表单通用 ───────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field > span em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 11.5px; }
.field > span i { color: var(--bad); font-style: normal; }
.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #9ca3af; }
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, 1fr); }
.field-pass { position: relative; }
.field-pass input { padding-right: 56px; }
.pass-toggle {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    height: 28px; padding: 0 8px; border: 0; border-radius: 6px;
    background: transparent; color: var(--muted); cursor: pointer; font-size: 12px;
}
.pass-toggle:hover { background: var(--bg-soft); color: var(--ink); }

.stepper {
    display: flex;
    align-items: center;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    background: #fff;
    overflow: hidden;
}
.stepper input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn {
    width: 40px; height: 100%;
    border: 0;
    background: transparent;
    color: var(--ink-2);
    font-size: 17px;
    cursor: pointer;
}
.step-btn:hover { background: var(--bg-soft); color: var(--ink); }

/* 支付方式 */
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pay-option { position: relative; cursor: pointer; }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    transition: border-color .15s, background .15s;
}
.pay-option:hover .pay-option-inner { border-color: var(--line-2); }
.pay-ico {
    display: grid; place-items: center;
    width: 26px; height: 26px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--muted);
}
.pay-alipay { background: #1677ff; }
.pay-wxpay { background: #07c160; }
.pay-text { display: flex; flex-direction: column; line-height: 1.35; }
.pay-text b { font-size: 13px; font-weight: 600; }
.pay-text small { font-size: 11px; color: var(--muted); }
.pay-check {
    margin-left: auto;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    position: relative;
    flex: none;
}
.pay-option input:checked + .pay-option-inner {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.pay-option input:checked + .pay-option-inner .pay-check { border-color: var(--brand); background: var(--brand); }
.pay-option input:checked + .pay-option-inner .pay-check::after {
    content: "";
    position: absolute;
    left: 4.5px; top: 3.5px;
    width: 5px; height: 8px;
    border: 2px solid #fff;
    border-top: 0; border-left: 0;
    transform: rotate(40deg) translate(-1px, -1px);
}
.pay-option input:focus-visible + .pay-option-inner { box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }

/* 模态框 */
.buy-modal { position: fixed; inset: 0; z-index: 80; display: none; }
.buy-modal.is-open { display: block; }
.modal-scrim {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, .42);
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
    position: relative;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    margin: 6vh auto 0;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 24px 60px rgba(17, 24, 39, .16);
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.modal-x {
    position: absolute;
    right: 12px; top: 12px;
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    z-index: 5;
}
.modal-x:hover { color: var(--ink); background: var(--bg-soft); }
.modal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding-right: 34px; }
.modal-emoji {
    display: grid; place-items: center;
    width: 50px; height: 50px;
    border-radius: 10px;
    font-size: 24px;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    border: 1px solid var(--line);
    flex: none;
}
.modal-emoji img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.modal-total span { font-size: 12.5px; color: var(--muted); }
.modal-total b { display: block; font-size: 22px; letter-spacing: -.02em; }
.modal-tip { font-size: 11.5px; color: var(--muted); text-align: center; }

/* 提示条 */
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.flash {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    animation: fadeUp .2s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
.flash-success { border-color: #bbf7d0; background: var(--ok-soft); color: var(--ok); }
.flash-error { border-color: #fecaca; background: var(--bad-soft); color: var(--bad); }
.flash-warn { border-color: #fde68a; background: var(--warn-soft); color: var(--warn); }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid var(--line);
    background: var(--bg-soft);
}
.alert-warn { border-color: #fde68a; background: var(--warn-soft); color: var(--warn); }
.alert-error { border-color: #fecaca; background: var(--bad-soft); color: var(--bad); }

/* toast */
.toast-stack {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.toast {
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-md);
    font-size: 13px;
    color: var(--ink);
    animation: toastIn .2s ease;
}
.toast.is-ok { border-color: #86efac; }
.toast.is-err { border-color: #fca5a5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────────── 商品详情 ───────────── */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 26px 0 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink-2); font-weight: 500; }
.detail {
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: 32px;
    align-items: start;
}
.detail-media { min-width: 0; }
.detail-cover {
    position: relative;
    height: 290px;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--g1), var(--g2));
}
.cover-emoji.big { font-size: 96px; }
.detail-badges { display: flex; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; flex-wrap: wrap; }
.detail-badges li {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--ink-2);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
}
.detail-top { min-width: 0; }
.detail-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-info h1 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.detail-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.detail-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.stock-pill {
    margin-left: auto;
    font-size: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--ok-soft);
    color: var(--ok);
    border: 1px solid #bbf7d0;
}
.stock-pill.is-out { background: var(--bad-soft); color: var(--bad); border-color: #fecaca; }
.buy-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
}
.buy-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.buy-total span { font-size: 12.5px; color: var(--muted); }
.buy-total b { display: block; font-size: 24px; letter-spacing: -.02em; }
.detail-desc { margin-top: 26px; }
.detail-desc h3 { font-size: 16px; margin-bottom: 10px; }
.prose { color: var(--ink-2); font-size: 13.8px; line-height: 1.85; word-break: break-word; }

.card-panel {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    padding: 22px;
}
.card-panel h3 { font-size: 15px; margin-bottom: 12px; font-weight: 600; }

/* ───────────── 收银台 ───────────── */
.checkout-steps {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 28px 0 22px;
    flex-wrap: wrap;
}
.step {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--muted);
    padding: 6px 12px 6px 7px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
}
.step span {
    display: grid; place-items: center;
    width: 19px; height: 19px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
}
.step.is-active { color: var(--brand); border-color: #bfdbfe; background: var(--brand-soft); }
.step.is-active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-done { color: var(--ok); border-color: #bbf7d0; background: var(--ok-soft); }
.step.is-done span { background: var(--ok); border-color: var(--ok); color: #fff; }

.pay-layout { display: grid; grid-template-columns: 1.4fr .85fr; gap: 20px; align-items: start; }
.pay-panel { display: flex; flex-direction: column; gap: 16px; }
.pay-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pay-kicker { font-size: 11.5px; color: var(--muted); font-family: var(--mono); letter-spacing: .02em; }
.pay-head h2 { font-size: 20px; margin: 5px 0; }
.pay-sub { font-size: 12.5px; color: var(--muted); }
.pay-amount { text-align: right; }
.pay-amount span { font-size: 12px; color: var(--muted); }
.pay-amount b { display: block; font-size: 28px; letter-spacing: -.02em; }
.redirect-hint {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 15px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font-size: 13.5px;
    color: var(--ink-2);
}
.redirect-hint em { color: var(--brand); font-style: normal; font-weight: 700; }
.spinner {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    animation: spin .8s linear infinite;
    flex: none;
}
.spinner.big { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-form { display: flex; flex-direction: column; gap: 10px; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-actions.center { justify-content: center; }
.pay-side h3 { margin-bottom: 12px; }
.kv { display: flex; flex-direction: column; gap: 0; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); flex: none; }
.kv dd { margin: 0; text-align: right; color: var(--ink); word-break: break-all; }
.kv-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.kv-2 > div { font-size: 12.8px; }
.side-note {
    margin-top: 14px;
    padding: 13px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font-size: 12.5px;
    color: var(--muted);
}
.side-note b { display: block; color: var(--ink-2); font-size: 12.5px; margin-bottom: 5px; }
.side-note p { line-height: 1.7; }

/* ───────────── 订单页 ───────────── */
.order-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 28px; flex-wrap: wrap; }
.order-title { font-size: 28px; letter-spacing: -.02em; }
.order-head-actions { display: flex; gap: 8px; align-items: center; }
.status-pill { font-size: 12px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.status-paid { color: var(--ok); }
.status-pending { color: var(--warn); }
.status-closed { color: var(--bad); }
.status-pill.status-paid { background: var(--ok-soft); border-color: #bbf7d0; }
.status-pill.status-pending { background: var(--warn-soft); border-color: #fde68a; }
.status-pill.status-closed { background: var(--bad-soft); border-color: #fecaca; }

.success-panel { text-align: center; margin-bottom: 20px; }
.success-mark {
    width: 68px; height: 68px;
    margin: 2px auto 14px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: var(--ok);
    background: var(--ok-soft);
    border: 1px solid #bbf7d0;
}
.success-panel h2 { font-size: 21px; margin-bottom: 5px; }
.card-keys { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 0; text-align: left; }
.key-row {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: var(--brand-soft);
}
.key-index { font-size: 11px; color: var(--muted); flex: none; }
.key-text { flex: 1; font-size: 13.5px; letter-spacing: .02em; word-break: break-all; color: var(--ink); }
.delivery-note { margin-top: 16px; text-align: left; padding: 14px; border-radius: 8px; border: 1px dashed var(--line-2); }
.delivery-note b { font-size: 12.5px; display: block; margin-bottom: 6px; color: var(--ink-2); }
.pending-panel { text-align: center; margin-bottom: 20px; }
.pending-panel .spinner.big { margin: 2px auto 16px; }
.pending-panel h2 { font-size: 20px; margin-bottom: 5px; }
.pending-panel .pay-actions { margin-top: 18px; }
.status-only { max-width: 520px; margin: 36px auto; text-align: center; }
.status-ico { font-size: 40px; margin-bottom: 8px; }
.status-only .alert { text-align: left; margin: 16px 0; }

/* ───────────── 查询页 ───────────── */
.query-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: start; padding-top: 32px; }
.query-panel h1 { font-size: 26px; margin: 12px 0 6px; }
.query-side h3 { margin-bottom: 12px; }
.query-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.support-list { list-style: none; padding: 0; margin: 0 0 4px; }
.support-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.support-list li span { color: var(--muted); }
.support-list li b { font-weight: 600; }

/* ───────────── 空状态 ───────────── */
.empty {
    text-align: center;
    padding: 60px 22px;
    border-radius: var(--radius);
    border: 1px dashed var(--line-2);
    background: var(--bg-soft);
}
.empty-emoji { font-size: 40px; margin-bottom: 10px; }
.empty h3 { font-size: 17px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

/* ───────────── 页脚 ───────────── */
.footer {
    margin-top: 64px;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
    padding: 28px 0;
}
.footer-inner { display: flex; justify-content: space-between; gap: 18px; align-items: center; flex-wrap: wrap; }
.footer-main { min-width: 0; }
.brand-footer { font-size: 14px; }
.footer-note { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.footer-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip-soft {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
}
.footer-admin { font-size: 12px; color: var(--muted); }
.footer-admin:hover { color: var(--ink); }

/* ───────────── 响应式 ───────────── */
@media (max-width: 1000px) {
    .hero { padding-top: 48px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail { grid-template-columns: 1fr; }
    .detail-cover { height: 230px; }
    .pay-layout { grid-template-columns: 1fr; }
    .query-layout { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
    .nav, .topbar-actions .btn-ghost { display: none; }
    .topbar-inner { height: 58px; }
    .wrap { padding: 0 16px; }
    .hero-stats { gap: 22px; }
    .hero-stats dt { font-size: 19px; }
    .product-grid { grid-template-columns: 1fr; }
    .field-row, .field-row.three { grid-template-columns: 1fr; }
    .pay-options { grid-template-columns: 1fr; }
    .kv-2 { grid-template-columns: 1fr; }
    .cover { height: 140px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .modal-card { margin-top: 0; max-height: 100vh; border-radius: 14px 14px 0 0; position: absolute; bottom: 0; width: 100%; }
    .detail-price .stock-pill { margin-left: 0; }
    .order-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}