:root {
    color-scheme: light;
    --bg: #e7e7ed;
    --bg-2: #f5f5f7;
    --bar: rgba(255, 255, 255, .78);
    --card: rgba(255, 255, 255, .86);
    --text: #1d1d1f;
    --muted: #6e6e73;
    --line: rgba(0, 0, 0, .08);
    --blue: #0071e3;
    --blue-press: #0062c7;
    --ok: #248a3d;
    --danger: #d70015;
    --warn: #b26a00;
    --shadow: 0 18px 50px rgba(0, 0, 0, .08);
    --radius: 18px;
    --font: "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #1c1c1e;
    --bg-2: #2c2c2e;
    --bar: rgba(44, 44, 46, .8);
    --card: rgba(44, 44, 46, .9);
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .1);
    --blue: #0a84ff;
    --blue-press: #409cff;
    --ok: #30d158;
    --danger: #ff453a;
    --warn: #ffd60a;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(10, 132, 255, .16), transparent 50%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 12px; }
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 8px; }
p { margin: 0 0 12px; }

.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: var(--card);
    color: var(--text);
    padding: 8px 12px;
    z-index: 50;
}
.skip:focus { top: 8px; }

.menubar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 56px;
    padding: 8px 22px;
    background: var(--bar);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}
.brand,
.brand:hover,
.brand:focus,
.brand:focus-visible,
.brand:active {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.03em;
    text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.site-search { position: relative; flex: 1 1 160px; width: auto; max-width: 280px; min-width: 140px; }
.account-search { flex: none; width: 100%; max-width: none; min-width: 0; margin: 0 0 16px; }
.account-search .search-panel { left: 0; right: auto; width: 100%; }
.search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.site-search input {
    width: 100%;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    padding: 0 14px;
}
.site-search input:focus { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); border-color: transparent; }
.search-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, 78vw);
    max-height: 380px;
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 40;
    padding: 6px;
}
.search-hit,
.search-hit:hover,
.search-hit:focus {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
}
.search-hit:hover, .search-hit.is-active { background: color-mix(in srgb, var(--blue) 14%, transparent); }
.search-hit strong { font-size: 14px; font-weight: 650; }
.search-hit span, .search-empty { color: var(--muted); font-size: 12px; }
.search-empty { margin: 0; padding: 10px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.site-nav a, .account-side a {
    color: var(--text);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
}
.site-nav a.is-active, .account-side a.is-active, .filters a.is-active {
    background: color-mix(in srgb, var(--blue) 16%, transparent);
    color: var(--blue);
}
.menu-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; display: block; margin: 0 auto; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.page-wrap { width: min(1100px, calc(100% - 32px)); margin: 28px auto 48px; }
.page-wrap > .page { width: auto; margin: 0; }
.page-wrap.has-mobile-entry {
    width: min(1320px, calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
    align-items: start;
}
.mobile-entry {
    position: sticky;
    top: 72px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 16px 18px;
    text-align: center;
}
.mobile-entry h2 { font-size: 16px; margin: 0 0 10px; }
.mobile-entry p {
    color: var(--muted);
    font-size: 13px;
    text-align: left;
    margin: 0 0 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.mobile-entry img {
    width: 168px;
    height: 168px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
}
.site-footer {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto 32px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.footer-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
.site-footer a { color: var(--muted); }
.copyright { margin: 0; }
.beian { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin: 6px 0; }
.company { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 28px; margin-top: 14px; }
.company-lines { display: grid; justify-items: center; gap: 4px; }
.company-lines p { margin: 0; }
.wx-qr { width: 112px; height: 112px; object-fit: contain; border-radius: 8px; background: #fff; }

.window {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 22px;
}
.window-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px;
    background: color-mix(in srgb, var(--bg-2) 80%, transparent);
    border-bottom: 1px solid var(--line);
}
.lights { display: flex; gap: 6px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.lights i:nth-child(1) { background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.window-title { color: var(--muted); font-size: 13px; }
.window-body { padding: 22px; }
.hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(200px, 280px);
    gap: 28px;
    align-items: center;
}
.hero-copy { min-width: 0; }

.brand-stage {
    background: #fff;
    border-radius: 16px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 0;
}
.brand-stage img {
    width: auto;
    max-width: 100%;
    max-height: 240px;
    height: auto;
    object-fit: contain;
}
.stage-fallback { color: #1d1d1f; font-size: 28px; font-weight: 650; margin: 0; }
.lede { color: var(--muted); font-size: 16px; max-width: 760px; }
.hero-actions, .form-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-ghost, .btn-quiet {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}
.btn-block { width: 100%; }
.btn:disabled, .btn.is-busy, .btn[aria-disabled="true"] {
    opacity: .55;
    pointer-events: none;
    cursor: not-allowed;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.stats a, .service-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.stats a { display: block; color: inherit; text-decoration: none; }
.stats a:hover { border-color: var(--blue); }
.stats strong { display: block; font-size: 28px; }
.stats span, .eyebrow, .service-meta, .field-hint { color: var(--muted); font-size: 13px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 10px 0 14px; }
.home-services { margin-bottom: 48px; }
.service-guide { margin-top: 48px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card h3 { min-height: 48px; }
.service-card h3 a { color: var(--text); text-decoration: none; }
.service-card h3 a:hover { color: var(--blue); }
.service-meta { display: flex; justify-content: space-between; margin-top: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
.steps li { background: color-mix(in srgb, var(--bg) 70%, transparent); border-radius: 14px; padding: 14px; }

.filters { display: flex; gap: 8px; margin: 0 0 16px; }
.filters a {
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--card);
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; list-style: none; color: var(--muted); font-size: 13px; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; }
.spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 22px; }
.spec div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.spec dt { color: var(--muted); font-size: 13px; }
.spec dd { margin: 4px 0 0; font-weight: 650; }
.result-sheet {
    background: #fff;
    color: #1d1d1f;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 16px;
    line-height: 1.75;
    overflow-x: auto;
    white-space: normal;
}
.related { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prose { max-width: 820px; }
.prose h2 { margin-top: 28px; }
.prose ul { margin: 0 0 12px; padding-left: 1.3em; }
.prose li { margin: 0 0 8px; }
.about-facts { display: grid; gap: 12px; margin: 0 0 18px; }
.about-facts div { display: grid; gap: 2px; }
.about-facts dt { color: var(--muted); font-size: 13px; }
.about-facts dd { margin: 0; }
.service-detail { display: grid; gap: 8px; }
.notes { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.notes li { color: var(--muted); }

.auth-window { max-width: 560px; margin-left: auto; margin-right: auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field input {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    font: inherit;
    padding: 0 12px;
}
.field input:focus { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); border-color: transparent; }
.query-box {
    background: #fff;
    border: 2px solid var(--blue);
    border-radius: 16px;
    padding: 16px 16px 4px;
    margin: 0 0 16px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent);
}
.query-box .field span { color: var(--text); font-size: 15px; font-weight: 700; }
.query-box input {
    min-height: 48px;
    background: #fff;
    color: #1d1d1f;
    border: 1px solid #8e8e93;
    font-size: 16px;
}
.query-box input:focus { border-color: var(--blue); }
[data-theme="dark"] .query-box { background: #0b0b0d; }
[data-theme="dark"] .query-box input { background: #000; color: #f5f5f7; border-color: #8e8e93; }
.confirm-layer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, .45);
}
.confirm-layer[hidden] { display: none; }
.confirm-card {
    width: min(440px, 100%);
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
}
.confirm-card h2 { margin: 0 0 8px; font-size: 20px; }
.confirm-card p { margin: 0 0 14px; color: var(--muted); }
.confirm-card dl { display: grid; gap: 10px; margin: 0 0 16px; }
.confirm-card dt { color: var(--muted); font-size: 13px; }
.confirm-card dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; word-break: break-all; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.field input.is-invalid, .captcha-row input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
}
form[data-ajax] { overflow-anchor: none; }
.captcha-row, .inline-row { display: flex; gap: 8px; align-items: center; }
.captcha-row input, .inline-row input { flex: 1; }
.captcha-row img { border-radius: 10px; background: #fff; cursor: pointer; }
.rules { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 2px; }
.rules li { font-size: 13px; }
.rules li.is-ok { color: var(--ok); }
.rules li.is-bad { color: var(--danger); }
.caps-tip { color: var(--warn); font-size: 13px; margin: 4px 0 0; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-message { border-radius: 12px; padding: 10px 12px; margin: 8px 0 0; }
.form-message.is-ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.form-message.is-bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.toast, .flash {
    position: fixed;
    z-index: 80;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100% - 24px));
    margin: 0;
    padding: 12px 16px;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--line);
}
.toast.is-ok, .flash-ok {
    border-color: color-mix(in srgb, var(--ok) 50%, var(--line));
    background: color-mix(in srgb, var(--ok) 18%, var(--card));
}
.toast.is-bad, .flash-error {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
    background: color-mix(in srgb, var(--danger) 18%, var(--card));
}
.notice, .empty {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 14px;
    color: var(--muted);
}
.query-wait { display: flex; align-items: center; gap: 10px; color: var(--text); border-style: solid; border-color: var(--blue); }
.query-wait::before {
    content: "";
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    background: var(--blue);
    animation: query-pulse 1.1s ease-in-out infinite;
}
@keyframes query-pulse {
    0%, 100% { opacity: .3; }
    50% { opacity: 1; }
}

.list-tools { margin: 0 0 14px; }
.list-tools form { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.list-tools label { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.pager form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.list-tools input, .pager input {
    min-height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    padding: 0 10px;
}
.list-tools input[type="search"] { flex: 1; width: auto; min-width: 0; }
.list-tools .btn { flex: 0 0 auto; }
.pager input[type="number"] { width: 76px; }
.list-total { margin: 12px 0 0; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pager a, .pager span {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
}
.pager a.is-active, .pager span.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager .is-disabled { opacity: .45; }
.account-body { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.account-main { min-width: 0; }
.amount-picks, .channel-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.amount-entry input { width: 168px; max-width: 100%; }
.amount-entry .field-hint { margin: 0; }
.amount-picks button { min-width: 52px; border-radius: 6px; border-color: var(--line); }
.amount-picks button.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.channel-picks label { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.channel-picks input { width: auto; min-height: 0; }
.agree-row { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 16px; line-height: 1.5; }
.agree-row input { width: auto; min-height: 0; margin-top: 4px; }
.pay-due {
    background: #fff;
    color: #1d1d1f;
    border: 3px solid var(--blue);
    border-radius: 16px;
    padding: 18px 16px;
    margin: 0 0 16px;
    text-align: center;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 18%, transparent);
}
.pay-due span { display: block; font-size: 18px; font-weight: 700; }
.pay-due strong { display: block; margin: 4px 0 8px; font-size: 56px; line-height: 1.1; color: var(--blue); letter-spacing: -0.03em; }
.pay-due p { margin: 0; font-size: 18px; font-weight: 700; color: var(--danger); }
.pay-qr { width: 236px; min-height: 236px; background: #fff; padding: 8px; border-radius: 12px; }
.pay-qr img, .pay-qr canvas { display: block; width: 220px; height: 220px; -webkit-touch-callout: default; }
.pay-mobile-tip { margin-top: 12px; color: var(--text); font-weight: 700; line-height: 1.6; }
.account-side { display: grid; align-content: start; gap: 6px; }
.account-side nav { display: grid; }
.account-side strong { margin-bottom: 8px; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table caption { text-align: left; color: var(--muted); margin-bottom: 8px; }
.record-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}
.record-open:hover { background: var(--blue-press); color: #fff; text-decoration: none; }

@media (max-width: 900px) {
    .page-wrap.has-mobile-entry {
        grid-template-columns: 1fr;
        width: min(1100px, calc(100% - 32px));
    }
    .mobile-entry {
        position: static;
        order: -1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px 14px;
        text-align: left;
        align-items: center;
    }
    .mobile-entry h2 { grid-column: 1 / -1; margin: 0; }
    .mobile-entry p { margin: 0; grid-column: 1 / -1; }
    .mobile-entry:has(img) p { grid-column: 2; }
    .mobile-entry img { width: 96px; height: 96px; grid-row: 2; }
    .card-grid, .steps, .stats, .spec { grid-template-columns: 1fr; }
    .account-body { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-flex; }
    .toast, .flash { top: 118px; }
    .hero-body { grid-template-columns: 1fr; }
    .brand-stage { order: -1; padding: 10px; }
    .brand-stage img { max-height: 168px; }
    .site-search { width: 100%; order: 4; }
    .search-panel { left: 0; right: 0; width: auto; }
    .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        padding: 10px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }
    .site-nav.is-open { display: flex; }
    .menubar { flex-wrap: wrap; }
    .related li { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
