:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --fg: #20242b;
  --muted: #626a76;
  --border: #e1e5ea;
  --accent: #e83c47;
  --accent-strong: #cf2f3c;
  --accent-soft: #fff1f2;
  --gold: #ffbd16;
  --success: #15945a;
  --success-soft: #eaf8f1;
  --warning: #8a6500;
  --warning-soft: #fff8e7;
  --danger-soft: #fff0f1;
  --ink-blue: #173d86;
  --shadow: 0 24px 70px rgba(28, 42, 64, .12);
  --shadow-sm: 0 12px 32px rgba(28, 42, 64, .08);
  --font-display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--fg); font-family: var(--font-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.entry-unavailable { display:none; width:min(520px,calc(100% - 32px)); margin:15vh auto; padding:32px; border:1px solid var(--border); border-radius:16px; background:var(--surface); text-align:center; }
.entry-unavailable img { width:52px; height:52px; object-fit:contain; }
.entry-unavailable h1 { font-size:24px; margin:16px 0; }
.entry-unavailable p { color:var(--muted); line-height:1.8; }
body[data-entry-state] > header, body[data-entry-state] > main, body[data-entry-state] > footer { display:none; }
body[data-entry-state] > .entry-unavailable { display:block; }

.hero { position: relative; min-height: 590px; padding: 24px max(20px, calc((100vw - 1120px) / 2)) 138px; color: var(--ink-blue); overflow: hidden; background: color-mix(in srgb, var(--surface) 72%, var(--ink-blue)); }
.hero::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, var(--surface) 0%, var(--surface) 34%, transparent 84%); opacity: .94; }
.hero::after { content: ""; position: absolute; z-index: 1; left: -8%; right: -8%; bottom: -160px; height: 245px; border-radius: 50% 50% 0 0 / 44% 44% 0 0; background: var(--bg); }
.hero-bg { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 58%; }
.orb { position: absolute; border: 1px solid color-mix(in srgb, var(--surface) 25%, transparent); border-radius: 50%; }
.orb-a { width: 360px; height: 360px; right: -180px; top: -210px; }
.orb-b { width: 190px; height: 190px; left: -85px; bottom: 16px; }
.brand-row { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-combo { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 43px; border-radius: 10px; background: var(--surface); box-shadow: 0 6px 16px color-mix(in srgb, var(--ink-blue) 18%, transparent); }
.brand-mark img { width: 39px; height: 39px; object-fit: contain; }
.brand-text { display: grid; line-height: 1; }
.brand-text strong { font-size: 16px; letter-spacing: .04em; }
.brand-text small { margin-top: 5px; font-size: 7px; letter-spacing: .09em; opacity: .82; }
.brand-divider { width: 1px; height: 27px; background: color-mix(in srgb, var(--ink-blue) 25%, transparent); }
.wordmark { display: flex; align-items: baseline; gap: 3px; font-size: 23px; white-space: nowrap; }
.wordmark b { letter-spacing: -.05em; }
.wordmark span { font-weight: 300; }
.region-chip { padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--ink-blue) 16%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.hero-layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr); align-items: center; gap: 54px; max-width: 1120px; margin: 0 auto; }
.hero-copy { position: relative; z-index: 2; max-width: 740px; margin-top: 42px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--ink-blue) 13%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--surface) 67%, transparent); font-size: 13px; font-weight: 750; letter-spacing: .08em; backdrop-filter: blur(8px); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 20%, transparent); }
.hero h1 { margin-top: 18px; color: var(--ink-blue); font-size: clamp(30px, 5vw, 52px); line-height: 1.12; letter-spacing: -.04em; text-shadow: 0 2px 18px color-mix(in srgb, var(--surface) 70%, transparent); }
.hero-copy p { margin: 10px 0 0; color: color-mix(in srgb, var(--ink-blue) 82%, var(--muted)); font-size: clamp(15px, 2vw, 19px); font-weight: 600; }
.hero-slogan { display: flex; align-items: center; gap: 12px; width: min(540px, 100%); margin-top: 16px; color: var(--ink-blue); }
.hero-slogan i { flex: 1; height: 1px; background: color-mix(in srgb, var(--ink-blue) 34%, transparent); }
.hero-slogan strong { flex: 0 0 auto; font-size: 14px; letter-spacing: .2em; }
.hero-quickline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 17px; color: color-mix(in srgb, var(--ink-blue) 75%, var(--muted)); font-size: 13px; }
.hero-quickline svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.hero-quickline strong { color: var(--ink-blue); }
.hero-journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; width: min(700px, 100%); margin-top: 28px; }
.hero-step { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink-blue); text-align: left; opacity: .62; transition: opacity .18s ease, transform .18s ease; }
.hero-step:hover { opacity: 1; transform: translateY(-2px); }
.hero-step i { display: block; margin-bottom: 6px; color: color-mix(in srgb, var(--ink-blue) 52%, transparent); font: 800 17px var(--font-mono); font-style: normal; letter-spacing: .06em; }
.hero-step b { display: block; font-size: 14px; }
.hero-step small { display: block; margin-top: 5px; color: color-mix(in srgb, var(--ink-blue) 58%, transparent); font-size: 10px; white-space: nowrap; }
.hero-step.is-current { opacity: 1; }
.hero-step.is-current i { color: var(--gold); }
.hero-step.is-current b { color: var(--accent-strong); }
.hero-step.is-done { opacity: .84; }
.hero-step.is-done i::after { content: " ✓"; color: var(--success); }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.hero-action { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 0 16px; border: 1px solid color-mix(in srgb, var(--ink-blue) 20%, transparent); border-radius: 12px; color: var(--ink-blue); background: color-mix(in srgb, var(--surface) 64%, transparent); font-size: 13px; font-weight: 750; text-decoration: none; backdrop-filter: blur(8px); transition: transform .15s ease, background .15s ease; }
.hero-action:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.hero-action.primary { border-color: var(--accent); color: var(--surface); background: var(--accent); box-shadow: 0 12px 24px color-mix(in srgb, var(--accent-strong) 24%, transparent); }
.hero-visual { position: relative; width: 350px; margin-top: 62px; justify-self: end; animation: visual-float 4.6s ease-in-out infinite; }
.service-window { position: relative; overflow: hidden; border: 1px solid color-mix(in srgb, var(--surface) 24%, transparent); border-radius: 25px; color: var(--surface); background: var(--ink-blue); box-shadow: 0 24px 54px color-mix(in srgb, var(--ink-blue) 20%, transparent); }
.service-window::before { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border: 1px solid color-mix(in srgb, var(--surface) 17%, transparent); border-radius: 50%; box-shadow: 0 0 0 34px color-mix(in srgb, var(--surface) 4%, transparent), 0 0 0 68px color-mix(in srgb, var(--surface) 3%, transparent); }
.service-window-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid color-mix(in srgb, var(--surface) 15%, transparent); }
.service-window-head span { display: flex; align-items: center; gap: 8px; color: var(--surface); font-size: 13px; font-weight: 850; }
.service-window-head img { width: 29px; height: 29px; padding: 2px; border-radius: 8px; background: var(--surface); object-fit: contain; }
.service-window-head i { padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--surface) 20%, transparent); border-radius: 999px; color: var(--surface); background: color-mix(in srgb, var(--surface) 8%, transparent); font-size: 10px; font-style: normal; font-weight: 800; }
.service-window-body { position: relative; padding: 25px 25px 22px; }
.service-window-body > small { color: color-mix(in srgb, var(--gold) 74%, var(--surface)); font: 800 10px var(--font-mono); letter-spacing: .16em; }
.service-window-body h2 { margin-top: 8px; color: var(--surface); font-size: 28px; line-height: 1.18; }
.service-route { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border: 1px solid color-mix(in srgb, var(--surface) 17%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--surface) 7%, transparent); }
.service-route span { position: relative; padding: 13px 7px; color: color-mix(in srgb, var(--surface) 67%, transparent); font-size: 10px; text-align: center; }
.service-route span + span { border-left: 1px solid color-mix(in srgb, var(--surface) 13%, transparent); }
.service-route b { display: block; margin-bottom: 3px; color: var(--surface); font: 800 12px var(--font-mono); }
.service-route .done::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }
.service-window-foot { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 12px 17px; border-top: 1px solid color-mix(in srgb, var(--surface) 13%, transparent); color: color-mix(in srgb, var(--surface) 66%, transparent); font-size: 10px; }
.service-window-foot span:first-child { font-weight: 800; }
.mobile-service-strip { display: none; }
.scene-frame { display: none; margin: 0; }

/* 首屏主题：品牌红 */
body[data-hero-theme="brand-red"] .hero { color: var(--surface); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
body[data-hero-theme="brand-red"] .hero-bg { opacity: 0; }
body[data-hero-theme="brand-red"] .hero::before { background: none; opacity: 0; }
body[data-hero-theme="brand-red"] .brand-row,
body[data-hero-theme="brand-red"] .hero h1,
body[data-hero-theme="brand-red"] .hero-copy p,
body[data-hero-theme="brand-red"] .hero-slogan,
body[data-hero-theme="brand-red"] .hero-quickline,
body[data-hero-theme="brand-red"] .hero-quickline strong,
body[data-hero-theme="brand-red"] .hero-step { color: var(--surface); }
body[data-hero-theme="brand-red"] .brand-divider { background: color-mix(in srgb, var(--surface) 45%, transparent); }
body[data-hero-theme="brand-red"] .region-chip,
body[data-hero-theme="brand-red"] .eyebrow { color: var(--surface); border-color: color-mix(in srgb, var(--surface) 28%, transparent); background: color-mix(in srgb, var(--surface) 11%, transparent); }
body[data-hero-theme="brand-red"] .hero-slogan i { background: color-mix(in srgb, var(--surface) 42%, transparent); }
body[data-hero-theme="brand-red"] .hero-step i,
body[data-hero-theme="brand-red"] .hero-step small { color: color-mix(in srgb, var(--surface) 62%, transparent); }
body[data-hero-theme="brand-red"] .hero-step.is-current b { color: color-mix(in srgb, var(--gold) 45%, var(--surface)); }
body[data-hero-theme="brand-red"] .hero-action { color: var(--surface); border-color: color-mix(in srgb, var(--surface) 28%, transparent); background: transparent; }
body[data-hero-theme="brand-red"] .hero-action.primary { color: var(--accent-strong); border-color: var(--surface); background: var(--surface); }
body[data-hero-theme="brand-red"] .mobile-service-strip { color: var(--surface); border-color: color-mix(in srgb, var(--surface) 25%, transparent); background: color-mix(in srgb, var(--surface) 11%, transparent); }
body[data-hero-theme="brand-red"] .mobile-service-strip small,
body[data-hero-theme="brand-red"] .mobile-service-strip > i { color: color-mix(in srgb, var(--surface) 72%, transparent); }

.shell { position: relative; z-index: 3; width: min(1120px, calc(100% - 32px)); margin: -96px auto 58px; }
.card { border: 1px solid color-mix(in srgb, var(--accent) 9%, var(--border)); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.lookup-card { max-width: 900px; margin-inline: auto; padding: clamp(22px, 4vw, 42px); animation: card-rise .62s cubic-bezier(.2,.8,.2,1) both; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(23px, 3vw, 31px); }
.section-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.step-badge { flex: 0 0 auto; padding: 8px 11px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font: 700 12px var(--font-mono); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.identity-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field-label { display: flex; align-items: center; min-height: 22px; font-size: 13px; font-weight: 750; }
.field-label em { margin-left: 7px; padding: 2px 6px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: 10px; font-style: normal; }
.field-state { margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 650; }
.field small { min-height: 20px; color: var(--muted); font-size: 12px; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; outline: none; background: color-mix(in srgb, var(--surface) 70%, var(--bg)); color: var(--fg); transition: border-color .15s ease, box-shadow .15s ease; }
.textarea { min-height: 132px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); background: var(--surface); }
.input-shell { display: flex; align-items: center; min-height: 54px; padding: 0 10px 0 14px; border: 1px solid var(--border); border-radius: 15px; background: color-mix(in srgb, var(--surface) 72%, var(--bg)); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.input-shell:focus-within { border-color: color-mix(in srgb, var(--accent) 62%, var(--border)); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); }
.input-shell > svg { flex: 0 0 auto; width: 21px; height: 21px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.7; }
.input-shell .input { min-width: 0; min-height: 52px; padding: 10px 12px; border: 0; background: transparent; box-shadow: none; }
.input-shell .input:focus { border: 0; background: transparent; box-shadow: none; }
.phone-shell > b { flex: 0 0 auto; margin-left: 10px; padding-right: 11px; border-right: 1px solid var(--border); color: var(--fg); font-size: 12px; }
.phone-code-wrap { position: relative; flex: 1 1 auto; min-width: 0; margin: 0 9px; }
.phone-code-input { position: absolute; z-index: 2; inset: 0; width: 100%; padding: 0; border: 0; outline: none; background: transparent; color: transparent; caret-color: transparent; opacity: .01; }
.phone-digit-boxes { display: grid; grid-template-columns: repeat(4, minmax(32px, 1fr)); gap: 7px; }
.phone-digit-boxes i { display: grid; place-items: center; height: 38px; border: 1px solid var(--border); border-radius: 9px; color: var(--fg); background: var(--surface); font: 750 17px var(--font-mono); font-style: normal; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.phone-digit-boxes i:empty::before { content: ""; width: 9px; height: 1px; background: color-mix(in srgb, var(--muted) 36%, transparent); }
.phone-digit-boxes i.filled { border-color: color-mix(in srgb, var(--success) 45%, var(--border)); background: var(--success-soft); }
.phone-digit-boxes i.current { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.clear-input { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: color-mix(in srgb, var(--fg) 5%, transparent); font-size: 17px; opacity: 0; pointer-events: none; transition: opacity .15s ease, background .15s ease; }
.field:focus-within .clear-input, .field.is-valid .clear-input, .field.is-invalid .clear-input { opacity: 1; pointer-events: auto; }
.clear-input:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 10%, transparent); }
.field.is-valid .input-shell { border-color: color-mix(in srgb, var(--success) 55%, var(--border)); background: color-mix(in srgb, var(--success-soft) 42%, var(--surface)); }
.field.is-valid .field-state { color: var(--success); }
.field.is-invalid .input-shell { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.field.is-invalid .field-state, .field.is-invalid > small { color: var(--accent-strong); }
.unit-field { position: relative; }
.unit-trigger { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid var(--border); border-radius: 15px; color: var(--muted); background: color-mix(in srgb, var(--surface) 72%, var(--bg)); text-align: left; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.unit-trigger:hover { border-color: color-mix(in srgb, var(--fg) 28%, var(--border)); background: var(--surface); }
.unit-trigger:focus-visible, .unit-trigger[aria-expanded="true"] { outline: none; border-color: color-mix(in srgb, var(--accent) 62%, var(--border)); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); }
.unit-trigger > svg { flex: 0 0 auto; width: 21px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.7; }
.unit-trigger > span { min-width: 0; flex: 1; overflow: hidden; color: inherit; font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.unit-trigger.has-value { color: var(--fg); }
.unit-trigger > i { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: color-mix(in srgb, var(--fg) 5%, transparent); transition: transform .16s ease; }
.unit-trigger > i svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.unit-trigger[aria-expanded="true"] > i { transform: rotate(180deg); }
.field.is-valid .unit-trigger { border-color: color-mix(in srgb, var(--success) 55%, var(--border)); background: color-mix(in srgb, var(--success-soft) 42%, var(--surface)); }
.unit-picker { position: absolute; z-index: 25; top: 84px; left: 0; right: 0; overflow: hidden; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border)); border-radius: 17px; background: var(--surface); box-shadow: 0 22px 55px color-mix(in srgb, var(--fg) 17%, transparent); animation: picker-in .16s ease both; }
.unit-search { display: flex; align-items: center; min-height: 45px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, var(--bg)); }
.unit-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent); }
.unit-search svg { flex: 0 0 auto; width: 19px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.8; }
.unit-search input { min-width: 0; flex: 1; height: 43px; padding: 0 9px; border: 0; outline: 0; background: transparent; color: var(--fg); }
.unit-picker-head { display: flex; justify-content: space-between; gap: 12px; padding: 11px 4px 7px; color: var(--muted); font-size: 11px; }
.unit-options { display: grid; max-height: 250px; overflow-y: auto; overscroll-behavior: contain; }
.unit-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 43px; padding: 8px 10px; border: 0; border-radius: 10px; color: var(--fg); background: transparent; text-align: left; }
.unit-option:hover, .unit-option:focus-visible { outline: none; background: var(--accent-soft); }
.unit-option[aria-selected="true"] { color: var(--accent-strong); background: var(--accent-soft); font-weight: 750; }
.unit-option span { min-width: 0; overflow-wrap: anywhere; }
.unit-option i { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-style: normal; }
.unit-option[aria-selected="true"] i { color: var(--accent-strong); }
.unit-empty { padding: 26px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.unit-label { flex-wrap: wrap; gap: 6px 0; }
.unit-indicators { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; font-weight: 650; }
.unit-total { display: inline-flex; align-items: center; gap: 6px; color: var(--success); background: var(--success-soft); border-radius: 999px; padding: 4px 9px; font-variant-numeric: tabular-nums; }
.unit-total::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.unit-safety { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.unit-safety svg { width: 15px; height: 15px; fill: none; stroke: var(--success); stroke-width: 1.7; }
.unit-empty strong { display: block; color: var(--fg); font-size: 14px; }
.unit-empty p { max-width: 640px; margin: 10px auto 16px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.unit-empty p:empty { display: none; }
.unit-empty .btn { min-height: 40px; padding: 7px 14px; font-size: 12px; }
@media (max-width: 480px) {
  .unit-indicators { gap: 5px; font-size: 10px; }
  .unit-total { padding: 3px 6px; }
  .unit-empty { padding: 18px 8px; }
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.btn { min-height: 45px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-weight: 750; transition: transform .06s ease, background .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: var(--surface); background: var(--accent); box-shadow: 0 10px 22px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { color: var(--fg); border-color: var(--border); background: var(--surface); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-soft { color: var(--accent-strong); background: var(--accent-soft); }
.btn-ghost { padding-inline: 8px; color: var(--muted); background: transparent; }
.btn:disabled { cursor: not-allowed; opacity: .5; }
.btn-primary:disabled { color: #8b929d; background: #e8ebef; box-shadow: none; opacity: 1; }
.lookup-restriction { margin:22px 0; padding:20px 22px; border:1px solid #efdfb3; border-radius:14px; background:#fffaf0; color:#6b5422; }
.lookup-restriction strong { font-size:19px; color:#725014; }
.lookup-restriction p { font-size:16px; line-height:1.7; margin:8px 0 12px; }
.lookup-restriction small { display:block; margin-top:12px; font-size:14px; line-height:1.7; }
.restriction-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; font-size:16px; }
.restriction-actions b { font-variant-numeric:tabular-nums; }
.restriction-actions .btn { padding:9px 14px; font-size:14px; }
.form-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.form-submit > div { display: flex; align-items: center; gap: 10px; }
.form-submit #lookup-button { min-width: 170px; }
.form-submit > span { color: var(--muted); font-size: 12px; text-align: right; }
.form-submit > span.ready { color: var(--success); font-weight: 750; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; padding: 13px 14px; border-radius: 13px; background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.privacy-note svg { flex: 0 0 auto; width: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.status { margin-top: 18px; padding: 13px 14px; border-radius: 13px; font-size: 14px; }
.status.error { color: var(--accent-strong); background: var(--danger-soft); }
.status.success { color: var(--success); background: var(--success-soft); }

.result-panel, .eligibility-panel, .support-panel { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.credentials-update-notice { position:fixed; z-index:150; top:24px; right:24px; width:min(420px,calc(100vw - 32px)); box-sizing:border-box; display:flex; align-items:flex-start; gap:12px; padding:18px; border:1px solid #cce9da; border-radius:16px; background:#f5fcf8; color:#263d33; box-shadow:0 8px 30px #163f2520; }
.credentials-update-icon { flex:0 0 30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#e0f4e9; color:#16834e; }
.credentials-update-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.credentials-update-notice strong { display:block; color:#177b4c; font-size:18px; font-weight:700; line-height:1.5; }
.credentials-update-notice p { margin:6px 0 8px; font-size:15px; line-height:1.65; }
.credentials-update-notice small { font-size:12px; line-height:1.6; color:#5d7367; }
#dismiss-credentials-update { flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; padding:0; border:0; border-radius:8px; background:transparent; color:#5d7367; cursor:pointer; }
#dismiss-credentials-update:hover { background:#e0f4e9; }
#dismiss-credentials-update:focus-visible { outline:2px solid #16834e; outline-offset:2px; }
#dismiss-credentials-update svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
@media(max-width:680px) { .credentials-update-notice { top:12px; right:16px; padding:14px; gap:10px; } }
.eligibility-panel { margin-top: 26px; padding: 24px 0 0; border: 0; border-top: 1px solid var(--border); background: transparent; }
.eligibility-heading { display: flex; align-items: center; gap: 12px; }
.eligibility-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--warning-soft); color: var(--warning); }
.eligibility-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eligibility-panel.is-delegated .eligibility-mark { background: #edf4ff; color: #315f9e; }
.eligibility-panel.is-delegated .eligibility-body { padding: 20px; border: 1px solid #dce7f6; border-radius: 16px; background: #f8fbff; }
.eligibility-panel.is-delegated .eligibility-contact { background: #fff; border: 1px solid #e4ebf5; }
.eligibility-heading h3 { color: var(--fg); font-size: 24px; font-weight: 700; line-height: 1.5; }
.eligibility-heading div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 15px; }
.eligibility-body { margin: 15px 0 0 50px; max-width: 680px; }
.eligibility-body > p { margin: 0; color: var(--fg); font-size: 18px; font-weight: 500; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.eligibility-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 17px; }
.eligibility-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--fg); background: var(--surface); font-size: 15px; }
.eligibility-actions button + button { padding-inline: 0; border-color: transparent; color: var(--muted); background: transparent; }
.eligibility-actions button:hover { color: var(--accent-strong); }
.eligibility-actions #eligibility-help { min-height: 40px; padding-inline: 16px; background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; font-weight: 600; }
.eligibility-actions #eligibility-help:hover { background: #b92532; border-color: #b92532; color: #fff; }
.eligibility-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.eligibility-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.eligibility-actions button[aria-expanded="true"] svg { transform: rotate(180deg); }
.eligibility-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding: 16px; background: var(--bg); border-radius: 10px; }
.eligibility-contact img { display: block; width: 132px; aspect-ratio: 1; object-fit: contain; background: var(--surface); }
.eligibility-contact div { flex: 1 1 150px; }
.eligibility-contact strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.eligibility-contact p { margin: 6px 0 0; color: var(--muted); line-height: 1.8; font-size: 12px; white-space: pre-wrap; }
.eligibility-reference { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.eligibility-reference code { margin-left: 5px; font: 13px var(--font-mono); overflow-wrap: anywhere; }
.eligibility-feedback-actions { margin-top: 22px; flex-wrap: wrap; }
.eligibility-feedback-actions .btn { min-height: 52px; font-size: 17px; font-weight: 700; }
@media (max-width: 680px) {
  .eligibility-heading { align-items: flex-start; gap: 10px; }
  .eligibility-heading h3 { font-size: 21px; }
  .eligibility-body > p { font-size: 16px; }
  .eligibility-feedback-actions .btn { font-size: 16px; }
  .eligibility-body { margin-left: 0; }
  .eligibility-reference { flex-direction: column; }
}
.credential-pass { position: relative; padding: 24px; border: 1px solid color-mix(in srgb, var(--ink-blue) 14%, var(--border)); border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--ink-blue)), var(--surface)); box-shadow: 0 18px 55px rgba(33, 62, 109, .11); overflow: hidden; }
.credential-pass::before { position: absolute; top: 0; right: 0; width: 170px; height: 170px; border-radius: 0 0 0 100%; background: linear-gradient(135deg, color-mix(in srgb, var(--ink-blue) 9%, transparent), transparent 70%); content: ''; pointer-events: none; }
.result-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.result-title { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; }
.result-title h3 { margin-top: 3px; font-size: clamp(18px, 2.5vw, 23px); }
.result-kicker { color: var(--ink-blue); font: 800 10px var(--font-mono); letter-spacing: .08em; }
.secure-badge { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #27654c; background: #eaf7f0; font-size: 11px; font-weight: 750; }
.result-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--success); background: var(--success-soft); }
.result-icon svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.credential-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.credential { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; padding: 17px; border: 1px solid color-mix(in srgb, var(--ink-blue) 13%, var(--border)); border-radius: 17px; background: color-mix(in srgb, var(--surface) 82%, var(--bg)); }
.credential > div { min-width: 0; }
.credential small { display: block; color: var(--muted); }
.credential strong { display: block; margin-top: 6px; font: 750 17px var(--font-mono); letter-spacing: .035em; overflow-wrap: anywhere; }
.copy-credential, .credential-tools button { flex: 0 0 auto; border: 0; border-radius: 10px; color: var(--ink-blue); background: color-mix(in srgb, var(--ink-blue) 9%, var(--surface)); font: 750 12px var(--font-sans); cursor: pointer; }
.copy-credential { padding: 9px 11px; }
.credential-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.credential-tools button { padding: 7px 10px; }
.instruction-block { margin-top: 18px; }
.instruction-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.instruction-label strong { font-size: 13px; }
.instruction-label span { color: var(--muted); font-size: 11px; }
.instruction { padding: 17px; border: 1px dashed color-mix(in srgb, var(--ink-blue) 18%, var(--border)); border-radius: 15px; background: color-mix(in srgb, var(--ink-blue) 5%, var(--surface)); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; }
.result-next { margin-top: 19px; padding: 17px; border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border)); border-radius: 16px; background: var(--accent-soft); }
.result-next > strong { font-size: 14px; }
.result-next > p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.mini-route { display: flex; align-items: center; margin-top: 14px; color: var(--fg); font-size: 11px; }
.mini-route span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.mini-route span i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--surface); background: var(--accent); font: 700 10px var(--font-mono); font-style: normal; }
.mini-route > b { flex: 1; height: 1px; margin-inline: 8px; background: color-mix(in srgb, var(--accent) 25%, var(--border)); }
.support-grid { display: grid; grid-template-columns: 1fr 210px; gap: 24px; align-items: center; }
.support-copy h3 { font-size: 22px; }
.support-copy p { color: var(--muted); }
.incident { display: inline-flex; padding: 6px 9px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font: 700 12px var(--font-mono); }
.qr-frame { padding: 12px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
.qr-frame img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.qr-empty { display: grid; place-items: center; aspect-ratio: 1; padding: 18px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; }
.qr-frame small { display: block; margin-top: 8px; color: var(--muted); }
.guide-card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 44px; max-width: 900px; margin: 20px auto 0; padding: clamp(24px, 4vw, 42px); box-shadow: var(--shadow-sm); }
.guide-kicker { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font: 800 11px var(--font-mono); }
.guide-intro h2 { margin-top: 13px; font-size: clamp(23px, 3vw, 30px); }
.guide-intro p { margin: 10px 0 21px; color: var(--muted); font-size: 13px; }
.guide-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: start; padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: color-mix(in srgb, var(--surface) 80%, var(--bg)); }
.guide-steps li > i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--accent-strong); background: var(--accent-soft); font: 800 12px var(--font-mono); font-style: normal; }
.guide-steps strong { font-size: 13px; }
.guide-steps p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.mobile-result-bar { display: none; }
body.unit-picker-open .mobile-result-bar { display: none; }
.pagefoot { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 36px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.pagefoot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 管理后台 */
.admin-body { background: color-mix(in srgb, var(--bg) 72%, var(--surface)); }
.admin-topbar { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(18px, calc((100vw - 1280px) / 2)); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.portal-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; align-items: center; gap: 18px; width: min(1280px, calc(100% - 32px)); margin: 18px auto -8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 35px rgba(29,42,63,.06); }
.portal-current, .portal-stats, .portal-actions { display: flex; align-items: center; gap: 10px; }
.portal-current > span:first-child { color: var(--muted); white-space: nowrap; font-size: 13px; }
.portal-current .select { min-width: 210px; }
.portal-current .tag { flex: 0 0 auto; white-space: nowrap; }
.portal-stats { color: var(--muted); font-size: 13px; white-space: nowrap; }
.portal-stats b { color: var(--text); }
.portal-path { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.portal-actions { justify-content: flex-end; }
.publish-state-note { display: flex; align-items: center; gap: 16px; padding: 13px 16px; border: 1px solid #f3d99a; border-radius: 14px; color: #805d0a; background: #fff9e9; }
.publish-state-note b { color: var(--text); white-space: nowrap; }
.auto-config-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 14px 16px; border: 1px solid #cfe4da; border-radius: 14px; background: #f3faf7; color: #245b45; }
.auto-config-row input { margin-top: 4px; }
.auto-config-row span { display: grid; gap: 4px; }
.auto-config-row small { color: var(--muted); line-height: 1.6; }
.published-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.published-toolbar .input { max-width: 520px; }
.account-cell { max-width: 240px; overflow-wrap: anywhere; }
.portal-dialog { width: min(520px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(21,27,38,.28); }
.portal-dialog::backdrop { background: rgba(24,31,43,.48); backdrop-filter: blur(4px); }
.portal-dialog form { display: grid; gap: 18px; padding: 26px; }
.portal-dialog h2, .portal-dialog p { margin: 0; }
.portal-enabled { display: flex; align-items: center; gap: 9px; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.admin-brand img { width: 34px; height: 34px; object-fit: contain; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); width: min(1280px, calc(100% - 32px)); margin: 26px auto 60px; gap: 26px; }
.sidebar { position: sticky; top: 85px; align-self: start; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.nav-btn { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 43px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); text-align: left; }
.nav-btn:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); color: var(--fg); }
.nav-btn.active { color: var(--accent-strong); background: var(--accent-soft); font-weight: 750; }
.admin-main { min-width: 0; }
.admin-section { display: grid; gap: 20px; }
.admin-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.admin-title h1 { font-size: clamp(26px, 3vw, 38px); }
.admin-title p { margin: 5px 0 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric { padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 28px color-mix(in srgb, var(--fg) 5%, transparent); }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font: 750 clamp(28px, 4vw, 42px) var(--font-mono); letter-spacing: -.04em; }
.panel { padding: 22px; border: 1px solid var(--border); border-radius: 19px; background: var(--surface); box-shadow: 0 8px 28px color-mix(in srgb, var(--fg) 4%, transparent); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h2 { font-size: 20px; }
.chart { display: flex; align-items: flex-end; gap: 12px; min-height: 210px; padding: 20px 8px 0; border-bottom: 1px solid var(--border); }
.chart-day { flex: 1; display: grid; grid-template-rows: 160px auto; gap: 8px; min-width: 0; text-align: center; }
.bars { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 160px; }
.bar { width: min(20px, 34%); min-height: 2px; border-radius: 5px 5px 0 0; background: var(--success); }
.bar.fail { background: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.chart-day small { color: var(--muted); font: 11px var(--font-mono); }
.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop-zone { display: grid; place-items: center; min-height: 150px; padding: 20px; border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 16px; background: var(--accent-soft); text-align: center; }
.drop-zone input { max-width: 100%; }
.drop-zone strong { display: block; margin-bottom: 5px; }
.summary-row { display: flex; flex-wrap: wrap; gap: 9px; }
.tag { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--muted); font-size: 12px; }
.tag.good { color: var(--success); background: var(--success-soft); }
.tag.warn { color: var(--warning); background: var(--warning-soft); }
.tag.bad { color: var(--accent-strong); background: var(--danger-soft); }
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table th { position: sticky; z-index: 1; top: 0; background: color-mix(in srgb, var(--surface) 82%, var(--bg)); color: var(--muted); font-size: 12px; }
.table tbody tr:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); }
.table select { min-width: 220px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.match-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(430px, 42vw); min-width: 280px; min-height: 40px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: left; cursor: pointer; }
.match-select-trigger:hover, .match-select-trigger:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0; }
.match-select-trigger.selected { color: var(--fg); }
.match-select-trigger span { overflow: hidden; text-overflow: ellipsis; }
.match-select-trigger i { color: var(--muted); font-style: normal; }
.match-suggestion { display: block; max-width: 430px; margin-top: 5px; overflow: hidden; color: var(--warning); text-overflow: ellipsis; }
.match-picker-popover { position: fixed; z-index: 90; top: var(--picker-top); left: var(--picker-left); width: var(--picker-width); max-width: calc(100vw - 24px); padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 20px 60px color-mix(in srgb, var(--fg) 22%, transparent); }
.match-picker-head { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 9px; }
.match-picker-options { display: grid; max-height: 330px; overflow: auto; gap: 4px; }
.match-option { display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fg); text-align: left; cursor: pointer; }
.match-option:hover, .match-option:focus-visible { background: var(--accent-soft); outline: 0; }
.match-option small { color: var(--muted); }
.match-option.suggested { background: color-mix(in srgb, var(--warning-soft) 72%, var(--surface)); }
.match-option.clear { color: var(--accent-strong); }
.match-picker-empty { padding: 22px 12px; color: var(--muted); text-align: center; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.config-grid .full { grid-column: 1 / -1; }
.qr-preview { width: 170px; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.file-picker-button { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 13px; border: 1px dashed color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: 13px; background: var(--accent-soft); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.file-picker-button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface)); }
.file-picker-button svg { flex: 0 0 auto; width: 22px; color: var(--accent-strong); fill: none; stroke: currentColor; stroke-width: 1.7; }
.file-picker-button b { font-size: 13px; }
.file-picker-button small { margin-left: auto; color: var(--muted); font-size: 10px; }
.hero-config-preview { display: grid; gap: 8px; align-content: start; }
.hero-preview { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.hero-config-preview .btn { justify-self: start; min-height: 34px; padding-inline: 4px; }
.qr-config-preview { display: grid; gap: 8px; align-content: start; justify-items: start; }
.qr-config-preview .btn { min-height: 34px; padding-inline: 4px; }
.login-wrap { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
.login-card { width: min(420px, 100%); padding: 32px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-logo img { width: 48px; height: 48px; }
.login-card h1 { font-size: 25px; }
.login-card p { margin: 6px 0 0; color: var(--muted); }
.log-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.log-toolbar .input { width: min(260px, 100%); }
.outcome { font-weight: 750; }
.outcome.success { color: var(--success); }
.outcome.failed, .outcome.invalid, .outcome.ambiguous, .outcome.blocked, .outcome.record_limited { color: var(--accent-strong); }
.screen-canvas { max-width: 100%; border: 1px solid var(--border); border-radius: 16px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* 演示式操作引导 */
.activation-tour { position: fixed; z-index: 100; inset: 0; pointer-events: none; }
.tour-spotlight { position: fixed; z-index: 101; border: 2px solid var(--gold); border-radius: 18px; box-shadow: 0 0 0 9999px color-mix(in srgb, var(--fg) 62%, transparent), 0 0 0 7px color-mix(in srgb, var(--gold) 18%, transparent), var(--shadow-sm); transition: top .25s cubic-bezier(.2,.8,.2,1), left .25s cubic-bezier(.2,.8,.2,1), width .25s cubic-bezier(.2,.8,.2,1), height .25s cubic-bezier(.2,.8,.2,1); }
.tour-pointer { position: fixed; z-index: 103; display: grid; place-items: center; width: 38px; height: 38px; border: 3px solid var(--surface); border-radius: 50%; color: var(--surface); background: var(--accent); box-shadow: 0 10px 26px color-mix(in srgb, var(--fg) 28%, transparent); animation: tour-point .72s ease-in-out infinite alternate; }
.tour-pointer::before { content: ""; position: absolute; inset: -9px; border: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); border-radius: 50%; animation: tour-ripple 1.2s ease-out infinite; }
.tour-pointer svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.tour-tip { position: fixed; z-index: 104; width: min(380px, calc(100vw - 24px)); padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border)); border-radius: 21px; color: var(--fg); background: var(--surface); box-shadow: 0 28px 80px color-mix(in srgb, var(--fg) 30%, transparent); pointer-events: auto; }
.tour-tip::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; border-radius: 21px 21px 0 0; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.tour-close { position: absolute; right: 11px; top: 10px; display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 50%; color: var(--muted); background: color-mix(in srgb, var(--fg) 5%, transparent); font-size: 20px; }
.tour-tip-head { display: flex; align-items: center; gap: 8px; padding-right: 34px; color: var(--muted); font-size: 11px; font-weight: 750; }
.tour-count { padding: 4px 8px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font: 800 11px var(--font-mono); }
.tour-tip h3 { margin-top: 11px; font-size: 20px; }
.tour-tip p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.tour-dots { display: flex; gap: 5px; margin-top: 14px; }
.tour-dots i { width: 24px; height: 4px; border-radius: 999px; background: var(--border); }
.tour-dots i.on { background: var(--accent); }
.tour-actions { display: grid; grid-template-columns: 110px 1fr; gap: 9px; margin-top: 15px; }
.tour-tip.first .tour-actions { grid-template-columns: 1fr; }
.tour-tip.first #tour-prev { display: none; }

@keyframes visual-float { from, to { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
@keyframes card-rise { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tour-point { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes tour-ripple { from { transform: scale(.66); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
@keyframes picker-in { from { opacity: 0; transform: translateY(-6px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 900px) {
  .portal-toolbar { grid-template-columns: 1fr; }
  .portal-stats, .portal-actions { flex-wrap: wrap; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .mobile-service-strip { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-top: 22px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--ink-blue) 14%, transparent); border-radius: 14px; color: var(--ink-blue); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(10px); }
  .mobile-service-strip img { width: 34px; height: 34px; padding: 3px; border-radius: 9px; background: var(--surface); object-fit: contain; }
  .mobile-service-strip span { display: grid; line-height: 1.25; }
  .mobile-service-strip b { font-size: 12px; }
  .mobile-service-strip small { margin-top: 3px; color: color-mix(in srgb, var(--ink-blue) 65%, transparent); font-size: 9px; }
  .mobile-service-strip > i { margin-left: auto; color: color-mix(in srgb, var(--ink-blue) 72%, transparent); font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; overflow-x: auto; padding: 8px; }
  .nav-btn { flex: 0 0 auto; width: auto; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .portal-toolbar { width: calc(100% - 20px); margin-top: 10px; padding: 12px; }
  .portal-current { align-items: stretch; flex-wrap: wrap; }
  .portal-current .select { width: 100%; }
  .portal-actions .btn { flex: 1 1 auto; }
  .publish-state-note { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hero::before { background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 58%, transparent 100%); opacity: .92; }
  .hero-bg { object-position: 24% 58%; }
  body[data-hero-theme="balanced"] .hero { color: var(--ink-blue); background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--ink-blue) 4%, var(--surface))); }
  body[data-hero-theme="balanced"] .hero-bg { opacity: 0; }
  body[data-hero-theme="balanced"] .hero::before { background: none; opacity: 0; }
  body[data-hero-theme="balanced"] .brand-row,
  body[data-hero-theme="balanced"] .hero h1,
  body[data-hero-theme="balanced"] .hero-copy p,
  body[data-hero-theme="balanced"] .hero-quickline,
  body[data-hero-theme="balanced"] .hero-quickline strong { color: var(--ink-blue); }
  body[data-hero-theme="balanced"] .brand-divider { background: color-mix(in srgb, var(--ink-blue) 25%, transparent); }
  body[data-hero-theme="balanced"] .region-chip,
  body[data-hero-theme="balanced"] .eyebrow { color: var(--ink-blue); border-color: color-mix(in srgb, var(--ink-blue) 12%, transparent); background: color-mix(in srgb, var(--ink-blue) 5%, var(--surface)); }
  .brand-text, .brand-divider { display: none; }
  .region-chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { min-height: 370px; padding-top: 16px; padding-bottom: 70px; }
  .hero::after { bottom: -205px; height: 235px; }
  .hero-copy { margin-top: 28px; }
  .hero h1 { margin-top: 14px; font-size: 30px; line-height: 1.1; }
  .hero-copy p { margin-top: 9px; font-size: 14px; line-height: 1.55; }
  .hero-slogan, .hero-journey, .hero-actions, .mobile-service-strip { display: none; }
  .hero-quickline { width: fit-content; margin-top: 17px; padding: 8px 10px; border: 1px solid color-mix(in srgb, currentColor 12%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--surface) 64%, transparent); font-size: 12px; }
  .hero-quickline > span { display: none; }
  .shell { width: min(100% - 16px, 1120px); margin-top: -38px; }
  .lookup-card { border-radius: 20px; }
  .lookup-card { animation: none; transform: none; }
  .form-grid, .identity-fields, .credential-grid, .support-grid, .drop-grid, .config-grid { grid-template-columns: 1fr; }
  .form-grid, .identity-fields { gap: 19px; }
  .input-shell { min-height: 57px; }
  .unit-trigger { min-height: 57px; }
  .unit-picker { position: fixed; z-index: 60; top: auto; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); max-height: min(72vh, 570px); overflow-y: auto; padding: 14px; border-radius: 20px; }
  .unit-options { max-height: min(51vh, 390px); }
  .unit-search input { font-size: 16px; }
  .input-shell .input { min-height: 55px; font-size: 16px; }
  .phone-digit-boxes { gap: 6px; }
  .phone-digit-boxes i { height: 41px; font-size: 18px; }
  .form-submit { align-items: stretch; flex-direction: column; }
  .form-submit > div { display: grid; grid-template-columns: 1fr auto; }
  .form-submit #lookup-button { min-width: 0; min-height: 50px; }
  .form-submit > span { order: -1; text-align: left; }
  .field-wide, .config-grid .full { grid-column: auto; }
  .support-grid { text-align: center; }
  .qr-frame { width: min(230px, 100%); margin-inline: auto; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { padding: 15px; }
  .admin-layout { width: min(100% - 20px, 1280px); margin-top: 14px; }
  .panel { padding: 16px; }
  .admin-title { align-items: flex-start; flex-direction: column; }
  .match-picker-popover { top: auto; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; width: auto; border-radius: 20px; }
  .match-select-trigger { width: min(78vw, 430px); min-width: 250px; }
  .chart { gap: 5px; padding-inline: 0; }
  .tour-tip { padding: 18px 16px 16px; border-radius: 18px; }
  .tour-actions { grid-template-columns: 94px 1fr; }
  .guide-card { grid-template-columns: 1fr; gap: 24px; border-radius: 20px; }
  .guide-intro .btn { width: 100%; }
  .guide-steps li { grid-template-columns: 39px 1fr; padding: 13px; }
  .guide-steps li > i { width: 37px; height: 37px; }
  .mobile-result-bar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 17px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 18px 45px color-mix(in srgb, var(--fg) 24%, transparent); backdrop-filter: blur(14px); }
  .mobile-result-bar .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding-inline: 10px; text-decoration: none; }
  body.has-mobile-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .mini-route { gap: 4px; }
  .mini-route > b { margin-inline: 3px; }
  .mini-route span { font-size: 9px; }
  .credential-pass { margin-inline: -5px; padding: 18px 15px; border-radius: 20px; }
  .result-head { display: block; }
  .secure-badge { margin: -7px 0 15px 56px; }
  .credential-grid { grid-template-columns: 1fr; }
  .credential-tools { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 首屏文字与背景对比由统一变量驱动，自定义图片由 app.js 判断明暗 */
.hero {
  --hero-ink: #202a39;
  --hero-body: #525e6f;
  --hero-subtle: #647083;
  --hero-line: rgba(32, 42, 57, .2);
  --hero-panel: rgba(255, 255, 255, .76);
}
body[data-hero-contrast="light"] .hero {
  --hero-ink: #f8fafc;
  --hero-body: #e7edf6;
  --hero-subtle: #d5deeb;
  --hero-line: rgba(255, 255, 255, .34);
  --hero-panel: rgba(12, 30, 56, .34);
}
body[data-hero-contrast="dark"] .hero,
body[data-hero-contrast="light"] .hero { color: var(--hero-ink); }
body[data-hero-theme]:not([data-hero-theme="brand-red"])[data-hero-contrast="dark"] .hero::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .9) 38%, rgba(255, 255, 255, .2) 82%);
  opacity: 1;
}
body[data-hero-theme]:not([data-hero-theme="brand-red"])[data-hero-contrast="light"] .hero::before {
  background: linear-gradient(90deg, rgba(10, 27, 52, .93) 0%, rgba(10, 27, 52, .78) 40%, rgba(10, 27, 52, .16) 86%);
  opacity: 1;
}
.hero .brand-row,
.hero h1,
.hero .hero-slogan,
.hero .hero-quickline strong,
.hero .hero-step { color: var(--hero-ink); }
.hero .hero-copy p { color: var(--hero-body); }
.hero .hero-quickline,
.hero .hero-step small,
.hero .hero-step i { color: var(--hero-subtle); }
.hero .brand-divider,
.hero .hero-slogan i { background: var(--hero-line); }
.hero .region-chip,
.hero .eyebrow {
  color: var(--hero-ink);
  border-color: var(--hero-line);
  background: var(--hero-panel);
}
.hero .eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  letter-spacing: .06em;
  backdrop-filter: none;
}
.hero .eyebrow::before { display: none; }
body[data-hero-contrast="dark"] .hero h1 { text-shadow: none; }
body[data-hero-contrast="light"] .hero h1 { text-shadow: 0 2px 20px rgba(5, 18, 36, .28); }
.lookup-card .step-badge { display: none; }

@media (min-width: 901px) {
  body[data-hero-theme="balanced"] .hero {
    min-height: 560px;
    padding-bottom: 96px;
    background: #f5f7fa;
  }
  body[data-hero-theme="balanced"] .hero-bg { opacity: 0; }
  body[data-hero-theme="balanced"] .hero::before {
    display: block;
    background:
      radial-gradient(circle at 78% 22%, rgba(222, 231, 242, .68), transparent 30%),
      linear-gradient(180deg, #f8fafc, #f2f5f8);
    opacity: 1;
  }
  body[data-hero-theme="balanced"] .hero::after { display: none; }
  body[data-hero-theme="balanced"] .hero-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr);
    gap: 72px;
  }
  body[data-hero-theme="balanced"] .hero-copy { max-width: 680px; margin-top: 46px; }
  body[data-hero-theme="balanced"] .hero h1 { max-width: 680px; font-size: clamp(36px, 4vw, 50px); }
  body[data-hero-theme="balanced"] .hero-copy > p { font-size: 17px; font-weight: 520; }
  body[data-hero-theme="balanced"] .region-chip {
    padding: 1px 0 1px 16px;
    border: 0;
    border-left: 1px solid var(--hero-line);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
  }
  body[data-hero-theme="balanced"] .hero-visual {
    width: min(390px, 100%);
    margin-top: 48px;
    animation: none;
  }
  body[data-hero-theme="balanced"] .service-window { display: none; }
  body[data-hero-theme="balanced"] .scene-frame {
    display: block;
    overflow: hidden;
    padding: 8px 8px 0;
    border: 1px solid rgba(31, 43, 61, .1);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 22px 55px rgba(29, 48, 73, .11);
  }
  body[data-hero-theme="balanced"] .scene-frame img {
    display: block;
    width: 100%;
    height: 270px;
    border-radius: 12px;
    object-fit: cover;
    object-position: center 58%;
  }
  body[data-hero-theme="balanced"] .scene-frame figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 10px 7px;
    color: var(--fg);
    font-size: 11px;
  }
  body[data-hero-theme="balanced"] .scene-frame figcaption strong { font-size: 12px; }
  body[data-hero-theme="balanced"] .scene-frame figcaption span { color: var(--muted); text-align: right; }
  body[data-hero-theme="balanced"] .hero-step.is-current i { color: var(--accent-strong); }
  body[data-hero-theme="balanced"] .hero-step.is-current b { color: var(--fg); }
  body[data-hero-theme="balanced"] .shell { margin-top: -52px; }
}

@media (max-width: 680px) {
  body { background: var(--surface); }
  .hero {
    min-height: 0;
    padding: 12px 20px 28px;
    background: #f5f7fa;
  }
  .hero::after,
  .hero .orb { display: none; }
  body[data-hero-theme="balanced"] .hero { background: #f5f7fa; }
  body[data-hero-theme="balanced"][data-hero-contrast="light"] .hero { background: #173d86; }
  body[data-hero-theme="balanced"] .hero-bg { opacity: 0; }
  body[data-hero-theme="balanced"] .hero::before,
  body[data-hero-theme="brand-red"] .hero::before { display: none; }
  body[data-hero-theme="scenic"] .hero::before {
    display: block;
    background: linear-gradient(180deg, var(--hero-panel), color-mix(in srgb, var(--hero-panel) 84%, transparent));
    opacity: 1;
  }
  .brand-row {
    min-height: 48px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--hero-line);
  }
  .brand-combo { gap: 9px; }
  .brand-mark {
    width: 38px;
    height: 36px;
    border: 1px solid rgba(22, 39, 67, .08);
    border-radius: 9px;
    box-shadow: none;
  }
  .brand-mark img { width: 33px; height: 33px; }
  .wordmark { font-size: 20px; }
  .region-chip {
    max-width: 40vw;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: none;
  }
  .hero-copy { max-width: 390px; margin-top: 23px; }
  .hero .eyebrow { display: none; }
  .hero h1 {
    max-width: 350px;
    margin-top: 0;
    color: var(--hero-ink);
    font-size: clamp(26px, 7.4vw, 30px);
    font-weight: 760;
    line-height: 1.18;
    letter-spacing: -.035em;
    text-wrap: pretty;
  }
  body[data-hero-theme][data-hero-contrast] .hero h1 { color: var(--hero-ink); }
  body[data-hero-theme][data-hero-contrast] .hero .hero-copy p { color: var(--hero-body); }
  body[data-hero-theme][data-hero-contrast] .hero .hero-quickline,
  body[data-hero-theme][data-hero-contrast] .hero .hero-quickline strong { color: var(--hero-subtle); }
  .hero-copy p {
    max-width: 360px;
    margin-top: 9px;
    color: var(--hero-body);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.6;
  }
  .hero-quickline {
    width: auto;
    margin-top: 15px;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--hero-subtle);
    background: transparent;
    font-size: 11px;
  }
  .hero-quickline svg { width: 16px; color: var(--accent); }
  .hero-quickline strong { color: inherit; font-weight: 650; }
  .shell {
    width: 100%;
    margin: 0 auto 36px;
    background: var(--surface);
  }
  .lookup-card {
    max-width: none;
    margin: 0;
    padding: 26px 20px 32px;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
  }
  .section-head { align-items: baseline; margin-bottom: 24px; }
  .section-head h2 { font-size: 23px; letter-spacing: -.02em; }
  .section-head p { margin-top: 5px; font-size: 12px; }
  .step-badge {
    padding: 0;
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    font: 650 11px var(--font-body);
    white-space: nowrap;
  }
  .field-label { font-size: 13px; }
  .field:not(.is-valid):not(.is-invalid) .field-state { display: none; }
  .field-label em {
    margin-left: 6px;
    padding: 0;
    border-radius: 0;
    color: var(--accent-strong);
    background: transparent;
    font-size: 10px;
  }
  .input-shell,
  .unit-trigger {
    min-height: 54px;
    border-radius: 12px;
    background: var(--surface);
  }
  .input-shell .input { min-height: 52px; }
  .phone-digit-boxes i { border-radius: 8px; }
  .form-submit { margin-top: 20px; }
  .privacy-note {
    margin-top: 18px;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
  }
  .guide-card {
    margin: 0;
    padding: 30px 20px;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
  }
  .guide-kicker {
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-body);
  }
  .pagefoot { width: calc(100% - 40px); }
}

/* 2026-09-19 feedback/source UX */
.public-feedback-dialog{width:min(620px,calc(100vw - 28px));max-height:88dvh;overflow:auto;box-sizing:border-box}.feedback-auto-card{display:flex;flex-direction:column;gap:5px;padding:14px 16px;margin:10px 0 18px;border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--accent) 5%,var(--surface))}.feedback-auto-card span{color:var(--muted);font-size:14px}

#hero-guide.is-disabled,#guide-link.is-disabled,#mobile-guide.is-disabled,#open-guide.is-disabled{opacity:.42!important;cursor:not-allowed!important;pointer-events:none!important;filter:grayscale(.3)}
