:root {
  color-scheme: light;
  --background: #edf1f6;
  --surface: #f4f6f9;
  --white: #fff;
  --ink: #142235;
  --muted: #53647a;
  --blue: #1555a8;
  --blue-dark: #11468a;
  --pale: #e9f1fc;
  --line: #e1e7ef;
  --pad: clamp(15px, 4.3vw, 25px);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; width: 24px; height: 24px; flex: none; }
img, video { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid #2478d2; outline-offset: 3px;
}
.app-shell {
  max-width: 580px;
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-inline: 1px solid #dce4ee;
}
.app-shell[data-view="home"] { max-width: 620px; }
.app-shell[data-view="home"] main { display: flex; flex-direction: column; }
.app-shell[data-view="home"] :is(.welcome, .carousel, .carousel-placeholder) { flex: none; }
.topbar {
  position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center; min-height: 58px; padding: 5px 12px; background: var(--white); border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 1.0625rem; font-weight: 700; text-align: center; }
.nav-back, .brand-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; color: var(--blue);
}
.brand-icon { width: 36px; height: 36px; margin-left: 2px; background: var(--pale); }
.brand-icon svg, .nav-back svg { width: 20px; height: 20px; }
.preview-indicator { justify-self: end; padding-right: 3px; color: var(--muted); white-space: nowrap; font-size: .75rem; }
main { flex: 1; min-width: 0; }
main:focus { outline: none; }
.tabbar {
  position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  border-top: 1px solid var(--line); background: var(--white); padding: 3px 0 max(3px, env(safe-area-inset-bottom));
}
.tabbar a { min-height: 54px; display: grid; place-content: center; justify-items: center; gap: 3px; color: var(--muted); font-size: .8125rem; }
.tabbar a svg { width: 21px; height: 21px; }
.tabbar [aria-current="page"] { color: var(--blue); font-weight: 700; }
.welcome { display: flex; gap: 7px; align-items: center; min-height: 35px; padding: 5px var(--pad); background: #e8f1fe; color: var(--blue-dark); font-size: .875rem; }
.welcome svg { width: 15px; height: 15px; }
.carousel { position: relative; background: #15253b; }
.carousel-window { display: grid; aspect-ratio: 750 / 356; overflow: hidden; touch-action: pan-y; }
.carousel-frame { grid-area: 1/1; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .28s ease; }
.carousel-frame.active { opacity: 1; }
.carousel-frame:not(.active) { pointer-events: none; }
.carousel-frame img { width: 100%; height: 100%; object-fit: contain; }
.carousel-placeholder { aspect-ratio: 750 / 356; background: #e2edf8; }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 30px; height: 42px; padding: 0; color: white; background: #132339b5; border: 0; border-radius: 7px;
}
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-arrow.prev { left: 6px; }
.carousel-arrow.next { right: 6px; }
.carousel-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; padding: 0 3px; border-radius: 20px; background: #152238ac; }
.carousel-dots button { width: 28px; height: 27px; border: 0; padding: 0; display: grid; place-items: center; background: transparent; }
.carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: #9eafc4; }
.carousel-dots [aria-pressed="true"] span { width: 13px; border-radius: 6px; background: white; }
.home-content {
  flex: 1;
  display: grid; grid-template-rows: minmax(104px, 1fr) minmax(155px, 1.55fr) minmax(85px, .85fr);
  gap: clamp(12px, 1.7vh, 18px); padding: 16px var(--pad) 18px;
}
.home-content.compact-home { grid-template-rows: auto auto; align-content: start; }
.fetch-error { color: var(--muted); font-size: .875rem; }
.home-section { display: flex; flex-direction: column; min-width: 0; }
.section-heading { font-size: 1.1875rem; font-weight: 750; line-height: 1.35; margin-bottom: 9px; }
.hero-actions { flex: 1; display: grid; }
.home-action, .button {
  min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--blue-dark);
  font-weight: 650; white-space: nowrap;
}
.home-action { min-width: 0; min-height: 70px; padding: 10px; border-radius: 12px; font-size: clamp(1.125rem, 4.6vw, 1.375rem); gap: 12px; }
.hero-actions .primary { justify-content: flex-start; padding-inline: clamp(10px, 3vw, 20px); }
.home-action-arrow { margin-left: auto; width: 18px; height: 18px; }
.home-action-icon {
  flex: none; display: grid; place-items: center; width: clamp(38px, 10.5vw, 50px); aspect-ratio: 1;
  border-radius: 11px; color: var(--blue); background: var(--pale);
}
.primary .home-action-icon { color: var(--white); background: #ffffff26; }
.home-action-icon svg { width: 65%; height: 65%; }
.primary, .query-action.primary { background: var(--blue); color: white; border-color: var(--blue); }
.secondary { background: var(--pale); border-color: transparent; }
.button { padding-inline: 16px; }
.button.wide { width: 100%; }
.button.compact { min-height: 41px; padding-inline: 13px; font-size: .875rem; }
.tile-grid {
  flex: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: 1fr;
  gap: 1px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--line);
}
.tile {
  display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 54px; padding: 7px 10px;
  background: var(--white); font-size: clamp(.9375rem, 3.85vw, 1.125rem); line-height: 1.35; font-weight: 650;
}
.tile-icon, .intro-icon { display: grid; flex: none; place-items: center; color: var(--blue); background: var(--pale); border-radius: 8px; width: 32px; height: 32px; }
.tile-icon svg { width: 18px; height: 18px; }
.tile .tile-icon { width: clamp(38px, 10.5vw, 49px); height: clamp(38px, 10.5vw, 49px); border-radius: 10px; }
.tile .tile-icon svg { width: 61%; height: 61%; }
.tile-label { min-width: 0; text-wrap: balance; }
.tile-arrow { margin-left: auto; width: 12px; height: 12px; color: #62738a; }
.contact-grid .tile { min-height: 49px; }
.screen { padding: 24px var(--pad) 32px; }
.page-intro { margin-bottom: 20px; }
.page-intro h1, .screen > h1 { font-size: clamp(1.35rem, 5.5vw, 1.65rem); line-height: 1.25; letter-spacing: -.02em; }
.page-intro p, .screen > p { color: var(--muted); line-height: 1.65; margin-top: 8px; }
.intro-icon { width: 43px; height: 43px; margin-bottom: 12px; }
.panel, .result-card, .profile-card { padding: 17px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.panel h2 { font-size: 1.0625rem; }
.panel p { color: var(--muted); line-height: 1.6; margin-block: 7px 14px; }
.demo-note { display: flex; align-items: flex-start; gap: 8px; margin-block: 14px; padding: 10px 12px; color: var(--blue-dark); background: var(--pale); border-radius: 8px; font-size: .875rem; line-height: 1.5; }
.demo-note svg { width: 17px; height: 17px; margin-top: 2px; }
.result-list { display: grid; gap: 10px; margin-block: 15px; }
.result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 5px 8px; font-size: .875rem; font-weight: 650; }
.status-pill svg { width: 15px; height: 15px; }
.result-card[data-state="valid"] {
  --state-ink: #0e6330; --state-mark: #26a551; --state-ring: #69c986; --state-fill: #e9f8ee;
}
.result-card:is([data-state="not-found"], [data-state="pending"], [data-state="internal-pending"], [data-state="conflict"], [data-state="missing"]) {
  --state-ink: #a75106; --state-mark: #cc7209; --state-ring: #e6a444; --state-fill: #fff2da;
}
.result-card[data-state="outflow"] {
  --state-ink: #183686; --state-mark: #2258cf; --state-ring: #8db6ed; --state-fill: #e8f1ff;
}
.result-card .status-pill { color: var(--state-ink); background: var(--state-fill); }
.result-details { margin: 12px 0 0; }
.result-details > div {
  display: grid; grid-template-columns: minmax(4rem, auto) minmax(0, 1fr); gap: 12px;
  align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9375rem;
}
.result-details > div:last-child { border-bottom: 0; }
.result-details dt { color: var(--muted); }
.result-details dd {
  margin: 0; text-align: right; color: var(--ink); font-weight: 650; overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.result-hint { margin-top: 8px; color: var(--muted); line-height: 1.55; font-size: .9375rem; }
.result-screen {
  display: flex; flex-direction: column; min-height: calc(100vh - 59px); min-height: calc(100dvh - 59px);
  padding-top: clamp(23px, 5vh, 48px); padding-bottom: max(19px, env(safe-area-inset-bottom));
  background: #fbfcfe;
}
.result-card--single { padding: 0; background: transparent; border: 0; border-radius: 0; }
.result-heading { display: grid; justify-items: center; gap: 15px; text-align: center; }
.result-symbol {
  width: clamp(82px, 25vw, 106px); aspect-ratio: 1; display: grid; place-items: center;
  color: var(--state-mark); background: var(--state-fill); border: 2px solid var(--state-ring); border-radius: 50%;
}
.result-symbol svg { width: 54%; height: 54%; stroke-width: 2.8; }
.result-title {
  color: var(--state-ink); font-size: clamp(1.8rem, 8vw, 2.4rem); font-weight: 750;
  line-height: 1.25; text-wrap: balance;
}
[data-state="not-found"] .result-title { font-size: clamp(1.25rem, 6.4vw, 1.85rem); }
.result-heading .result-hint { margin-top: -6px; }
.result-card--single .result-details {
  margin-top: clamp(23px, 5vh, 43px); padding: 0 16px; border: 1px solid #d9e2ed; border-radius: 10px;
  background: var(--white); box-shadow: 0 4px 13px #14314d06;
}
.result-card--single .result-details > div { padding: 13px 0; }
.result-card--single > .result-hint { margin-top: clamp(16px, 4vh, 30px); text-align: center; }
.result-guidance {
  border: 1px solid var(--guidance-border); border-radius: 10px;
  background: var(--guidance-bg); color: var(--guidance-ink);
  padding: 15px 16px; margin-block: 16px; line-height: 1.6;
}
.result-guidance--benefits {
  --guidance-border: #cee6d8; --guidance-bg: #f2f9f5; --guidance-ink: #195032;
}
.result-guidance--risks {
  --guidance-border: #eed7d3; --guidance-bg: #fff6f4; --guidance-ink: #972b25;
}
.result-guidance h2 { font-size: 1rem; margin-bottom: 6px; }
.result-guidance ul, .result-guidance ol { list-style: none; margin: 0; padding: 0; }
.result-guidance li, .result-guidance p { font-size: .9375rem; }
.result-guidance p { margin-top: 10px; }
.result-guidance a {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 4px; font-size: .9375rem; font-weight: 650; text-decoration: underline;
}
.result-guidance + .result-guidance { margin-top: 0; }
.result-card > .result-guidance { margin-bottom: 0; }
.result-actions { display: grid; gap: 10px; margin-top: auto; padding-top: clamp(22px, 6vh, 55px); }
.result-screen--guided > .result-actions { padding-top: 14px; }
.result-actions .button { min-height: 50px; border-color: #cbd7e7; color: var(--ink); }
.result-actions .primary { color: white; background: #0e3d91; border-color: #0e3d91; }
.result-actions .primary:hover { background: #123775; }
.result-screen > .result-demo-note { text-align: center; margin-top: 14px; font-size: .75rem; color: var(--muted); }
.profile-card { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
.profile-card h1 { font-size: 1.18rem; overflow-wrap: anywhere; }
.profile-card p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.avatar { width: 64px; height: 64px; overflow: hidden; display: grid; place-items: center; color: var(--blue); background: var(--pale); border-radius: 50%; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 29px; height: 29px; }
.profile-role { display: grid; gap: 8px; margin: 14px 0; }
.section-label, .profile-support { display: flex; align-items: center; gap: 9px; }
.profile-role .profile-support { padding-block: 12px; }
.profile-role .tile-arrow { display: block; }
.profile-support .quiet { margin-left: auto; color: var(--muted); font-size: .875rem; }
.profile-form { display: grid; gap: 18px; }
.avatar-picker { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 15px; cursor: pointer; }
.avatar-picker:focus-within .button { outline: 2px solid #2478d2; outline-offset: 3px; }
.avatar-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.form-field, .query-field { display: grid; gap: 6px; min-width: 0; font-weight: 650; }
.form-field :is(input, select), .query-input { color: var(--ink); background: white; border: 1px solid #c9d5e3; border-radius: 8px; min-height: 45px; min-width: 0; padding: 9px 11px; width: 100%; }
.form-notice { color: #a12620; line-height: 1.5; font-size: .875rem; }
.demo-accounts { margin-top: 14px; color: var(--muted); }
.demo-accounts h2 { font-size: 1rem; margin-bottom: 6px; }
.demo-accounts p { font-size: .875rem; }
.access-note { margin-top: 16px; color: var(--blue-dark); }
.contact-panel .button + .button { margin-top: 8px; }
button:disabled { cursor: wait; opacity: .64; }
.article { background: var(--white); }
.article-block + .article-block { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.article-block h2, .article h2 { margin-bottom: 9px; font-size: 1.125rem; line-height: 1.4; }
.article-block p, .article-block ol, .article-block ul { color: var(--muted); line-height: 1.75; margin-bottom: 8px; }
.article-copy { white-space: pre-line; overflow-wrap: anywhere; }
.article-block ol, .article-block ul { padding-left: 24px; }
.article-block li + li { margin-top: 8px; }
.article-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.article-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 7px 15px; color: white; background: var(--blue); border-radius: 8px; font-weight: 650; }
.photo-button { display: block; min-width: 0; width: 100%; padding: 0; background: transparent; border: 0; text-align: left; }
.photo-button img { width: 100%; height: auto; object-fit: contain; border-radius: 7px; background: var(--surface); }
.photo-feature { margin-bottom: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.photo-grid img { aspect-ratio: 4 / 3; }
.photo-caption { display: block; margin-top: 5px; color: var(--muted); font-size: .8125rem; }
.article-video { margin: 12px 0 22px; padding: 12px; background: #111c2a; border-radius: 10px; }
.article-video video { margin-inline: auto; width: 100%; max-width: 302px; height: auto; aspect-ratio: 544 / 960; object-fit: contain; }
.media-dialog { width: min(96vw, 980px); max-width: none; max-height: 94dvh; margin: auto; padding: 18px; border: 0; border-radius: 13px; color: white; background: #172335; }
.media-dialog::backdrop { background: #081019d9; }
.media-dialog figure { display: grid; gap: 9px; justify-items: center; }
.media-dialog form { justify-self: end; }
.media-dialog img { max-height: 75dvh; width: 100%; object-fit: contain; }
.close-button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: #2d405a; color: white; font-size: 1.4rem; }
.toast { position: fixed; z-index: 10; bottom: 75px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(88vw, 455px); padding: 10px 15px; border-radius: 9px; color: white; background: #18283be8; line-height: 1.5; }
.query-flow { display: grid; gap: 15px; }
.query-intro h1, .query-intro h2 { font-size: clamp(1.35rem, 5.5vw, 1.65rem); line-height: 1.25; margin-bottom: 8px; }
.query-mode, .query-help { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.query-mode { color: var(--blue); font-weight: 650; padding-bottom: 5px; }
.query-form { display: grid; gap: 12px; }
.query-rows { display: grid; gap: 8px; }
.query-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.query-input { text-transform: uppercase; }
.query-input[aria-invalid="true"] { border-color: #bc3934; }
.query-remove { min-width: 45px; min-height: 45px; padding-inline: 6px; border-radius: 8px; border: 1px solid var(--line); background: white; color: #9a3835; font-size: .875rem; }
.query-error { color: #a12620; font-size: .875rem; font-weight: 500; }
.query-actions { display: grid; grid-template-columns: .86fr .86fr 1.35fr; gap: 7px; }
.capture-rows .query-row { grid-template-columns: minmax(0, 1fr); }
.capture-actions { grid-template-columns: 1fr 1.45fr; }
.capture-output:empty { display: none; }
.capture-details { margin: 12px 0 0; }
.capture-details div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 7px; }
.capture-details dd { margin: 0; overflow-wrap: anywhere; }
.query-action, .query-sample { min-height: 43px; border-radius: 8px; background: white; border: 1px solid var(--line); color: var(--blue-dark); font-weight: 650; }
.query-samples, .query-scanner { padding: 13px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.query-samples h2, .query-samples h3, .query-scanner h2 { font-size: 1rem; margin-bottom: 8px; }
.query-sample { padding: 5px 10px; margin: 4px 4px 0 0; font-size: .875rem; min-height: 39px; }
.query-camera { width: 100%; margin-block: 8px; background: #142231; border-radius: 8px; aspect-ratio: 4 / 3; object-fit: contain; }
.query-scan-status, .query-notice { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.query-notice { background: var(--pale); padding: 9px 11px; border-radius: 8px; }
@media (max-width: 460px) {
  .tile { gap: 6px; padding-inline: 8px; }
  .tile-arrow { width: 10px; height: 10px; }
}
@media (max-width: 369px) {
  .tile-arrow { display: none; }
}
@media (max-width: 359px) {
  .tile { font-size: .9375rem; }
}
@media (hover: hover) {
  .tile:hover, .profile-support:hover, .tabbar a:hover { background: #f6f9fd; }
  .primary:hover { background: var(--blue-dark); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; } }
