:root {
  color-scheme: light;
  --ink: #262034;
  --muted: #80778f;
  --purple: #5335C1;
  --app-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
@supports (height: 100dvh) { :root { --app-height: 100dvh; } }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { position: fixed; inset: 0; background: #f5f3fa; color: var(--ink); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:disabled { cursor: wait; }
[hidden] { display: none !important; }
button:focus-visible { outline: 3px solid #a998df; outline-offset: 4px; }
.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 15% 20%, #ece7f8 0, transparent 48%), radial-gradient(ellipse at 94% 75%, #e9e6f3 0, transparent 45%), linear-gradient(145deg, #fbfaff, #f3f1f7 65%, #eeecf5); }
.ambient::after { content: ""; position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(#cfc7df30 1px, transparent 1px), linear-gradient(90deg, #cfc7df30 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(transparent, #000 55%, transparent); }
.ambient-orbit { position: absolute; width: 75vw; height: 75vw; max-width: 1000px; max-height: 1000px; border: 1px solid #dcd5e766; border-radius: 50%; }
.orbit-a { left: -45vw; top: 10%; }
.orbit-b { right: -46vw; bottom: -35%; }
.app-shell { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 16px; width: min(1100px, 100%); height: var(--app-height); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 36px max(22px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.brand-logo { display: block; width: 132px; height: 60px; object-fit: cover; object-position: 50% 47%; border-radius: 8px; }
.official-badge { display: flex; align-items: center; gap: 7px; font-size: 13px; letter-spacing: 1px; color: #6e5a94; }
.official-badge svg { width: 19px; height: 19px; }
.stage { display: grid; grid-template-columns: 1fr 410px; align-items: center; gap: 70px; min-height: 0; }
.intro { text-align: left; }
.security-art { width: min(230px, 29vh); aspect-ratio: 1; margin: -8px 0 0 38px; }
.security-art svg { display: block; width: 100%; height: 100%; }
.eyebrow { margin: 12px 0 13px; color: #89769e; font-size: 11px; font-weight: 600; letter-spacing: 3px; }
h1 { margin: 0; font-size: 43px; font-weight: 600; line-height: 1.3; letter-spacing: 2px; color: #2c2340; }
.intro-description { margin: 17px 0 0; font-size: 16px; line-height: 1.9; color: #80718f; letter-spacing: .5px; }
.query-card { position: relative; overflow: hidden; width: 100%; padding: 34px 30px 25px; background: linear-gradient(135deg, #ffffffed, #ffffffc9); border: 1px solid #fff; border-radius: 24px; box-shadow: 0 22px 65px #3f2e6810, 0 2px 6px #45316b05, inset 0 0 0 1px #f8f6fc; }
.card-accent { position: absolute; top: 0; left: 30px; right: 30px; height: 2px; background: linear-gradient(90deg, transparent, #baa9dc 35%, #7658bc 50%, #d7cee9 75%, transparent); opacity: .75; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row label { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.label-row > span { font-size: 12px; letter-spacing: 1px; color: #9a90a8; }
.input-hint { margin: 10px 0 19px; color: #93899f; font-size: 14px; line-height: 1.6; }
.input-wrap { position: relative; border: 1px solid #e5dfed; border-radius: 12px; background: #f7f5fa; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #947aca; box-shadow: 0 0 0 4px #8160c00b; background: #fcfbff; }
.input-wrap.is-invalid { border-color: #c58174; background: #fffafa; }
.input-symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 21px; height: 21px; color: #a99abc; }
.input-wrap input { display: block; min-width: 0; width: 100%; height: 63px; margin: 0; padding: 0 38px 0 48px; outline: 0; border: 0; border-radius: inherit; background: transparent; color: #453362; font-size: 25px; font-weight: 500; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.input-wrap input::placeholder { font-size: 17px; color: #ada3b9; font-weight: 400; letter-spacing: 2px; }
.clear-code { position: absolute; right: 10px; top: 50%; display: grid; place-items: center; transform: translateY(-50%); padding: 3px; border: 0; border-radius: 50%; width: 25px; height: 25px; color: #9b8bad; background: #ece7f2; }
.clear-code svg { width: 19px; height: 19px; }
.field-error { min-height: 20px; margin: 7px 0 9px; color: #ac5a4e; font-size: 13px; line-height: 20px; }
.submit-button, .modal-action { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 52px; padding: 12px 16px; border: 1px solid #ffffff25; border-radius: 11px; background: var(--purple); box-shadow: 0 8px 18px #5335C120, inset 0 1px 0 #ffffff25; color: #fff; font-size: 16px; font-weight: 500; letter-spacing: 2px; transition: filter .15s, transform .15s; }
.submit-button:hover, .modal-action:hover { filter: brightness(1.06); }
.submit-button:active, .modal-action:active { transform: translateY(1px); }
.submit-button:disabled { opacity: .7; }
.button-shield { width: 20px; height: 20px; color: #e8defe; }
.button-spinner { display: none; width: 18px; height: 18px; border: 2px solid #ffffff55; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .button-spinner { display: block; }
.is-loading .button-shield { display: none; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 17px 0 0; color: #a49aaf; font-size: 12px; letter-spacing: .5px; line-height: 18px; }
.privacy-note svg { width: 15px; height: 15px; }
.footer { display: flex; align-items: center; justify-content: center; gap: 16px; min-height: 22px; }
.footer p { color: #9a8da8; font-size: 12px; letter-spacing: 1px; margin: 0; line-height: 1.8; white-space: nowrap; }
.footer p span { margin: 0 5px; color: #b5a9c0; }
.footer-line { width: 40px; height: 1px; background: linear-gradient(90deg, transparent, #d9d1e4); }
.footer-line:last-child { transform: rotate(180deg); }
.modal { position: fixed; z-index: 100; top: 0; left: 0; display: grid; place-items: center; width: 100%; height: var(--app-height); padding: 24px; overflow: auto; overscroll-behavior: contain; }
.modal-backdrop { position: fixed; inset: 0; background: #251a3f66; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.result-card { position: relative; width: min(380px, 100%); max-height: calc(var(--app-height) - 48px); overflow: auto; padding: 35px 27px 22px; border: 1px solid #fff; border-radius: 25px; background: radial-gradient(ellipse at 50% -10%, #eeebf8, transparent 55%), #fff; box-shadow: 0 30px 90px #160d3d35; text-align: center; animation: appear .23s ease-out; outline: 0; }
.modal-close { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: #a599b6; border-radius: 50%; }
.modal-close svg { width: 23px; height: 23px; }
.result-emblem { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 18px; border: 1px solid #e0e9e4; border-radius: 50%; background: linear-gradient(140deg, #fff, #f0f6f2); box-shadow: 0 6px 18px #2f5c3e09, inset 0 0 0 5px #ffffffb3; color: #3b886d; }
.result-emblem svg { width: 43px; height: 43px; }
.result-kicker { margin: 0 0 9px; font-size: 10px; font-weight: 600; letter-spacing: 2.2px; color: #9b8bab; }
.result-card h2 { margin: 0; color: #2a5d49; font-size: 25px; font-weight: 600; line-height: 1.5; letter-spacing: 1px; }
.result-message { margin: 14px 0 0; color: #82768d; font-size: 16px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.result-code-block { display: flex; flex-direction: column; gap: 9px; padding: 15px; margin: 21px 0; background: #f8f6fb; border: 1px solid #eee9f4; border-radius: 12px; }
.result-code-block span { font-size: 12px; color: #a293af; }
.result-code-block strong { font-size: 23px; font-weight: 500; color: #67517f; letter-spacing: 4px; font-variant-numeric: tabular-nums; }
.result-code-block strong { overflow-wrap: anywhere; }
.result-code-block strong.is-long { font-size: 17px; letter-spacing: 1px; line-height: 1.6; }
.input-wrap.is-long input { font-size: 18px; letter-spacing: 1px; }
.result-details { margin: 18px 0 0; padding: 3px 15px; border: 1px solid #ece5f3; border-radius: 12px; background: #fbf9fd; text-align: left; }
.result-details > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
.result-details > div + div { border-top: 1px solid #ece5f3; }
.result-details dt { margin: 0; color: #95839f; font-size: 13px; line-height: 1.7; }
.result-details dd { margin: 0; color: #584469; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.result-card { display: flex; flex-direction: column; overflow: hidden; }
.result-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8a8cf transparent; }
.result-scroll::-webkit-scrollbar { width: 4px; }
.result-scroll::-webkit-scrollbar-thumb { border-radius: 4px; background: #b8a8cf; }
.result-scroll:focus-visible { outline: 2px solid #5335C180; outline-offset: -2px; border-radius: 8px; }
.result-card .modal-action, .result-card .result-signature { flex-shrink: 0; }
.result-card .modal-close { z-index: 3; }
.modal-action { margin-top: 22px; min-height: 49px; }
.result-signature { margin: 18px 0 0; color: #b0a5bb; font-size: 11px; line-height: 1.7; }
.result-card[data-state="invalid"] .result-emblem, .result-card[data-state="error"] .result-emblem { background: linear-gradient(140deg, #fff, #fbf4ec); border-color: #efe3d5; color: #b38550; }
.result-card[data-state="invalid"] h2, .result-card[data-state="error"] h2 { color: #8f6a43; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (min-width: 850px) and (max-height: 650px) {
  .security-art { width: 140px; margin-left: 55px; }
  h1 { font-size: 36px; }
  .intro-description { font-size: 14px; margin-top: 10px; }
}
@media (max-width: 849px) {
  .app-shell { width: min(480px, 100%); padding: max(20px, env(safe-area-inset-top)) 26px max(20px, env(safe-area-inset-bottom)); row-gap: 14px; }
  .topbar { min-height: 55px; }
  .brand-logo { width: 124px; height: 56px; }
  .official-badge { font-size: 12px; letter-spacing: .5px; gap: 5px; }
  .official-badge svg { width: 17px; height: 17px; }
  .stage { display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 3.4vh, 32px); }
  .intro { width: 100%; text-align: center; flex-shrink: 0; }
  .security-art { width: clamp(100px, 18vh, 156px); margin: -9px auto 0; }
  .eyebrow { margin: 7px 0 9px; font-size: 10px; letter-spacing: 2.6px; }
  h1 { font-size: 30px; letter-spacing: 2px; }
  .intro-description { margin-top: 11px; font-size: 14px; line-height: 1.7; letter-spacing: 0; }
  .desktop-break { display: none; }
  .query-card { flex-shrink: 0; padding: 25px 23px 21px; border-radius: 23px; }
  .input-hint { margin: 9px 0 15px; font-size: 14px; }
  .input-wrap input { height: 59px; }
  .privacy-note { margin-top: 15px; }
  .footer { gap: 11px; }
  .footer-line { width: 25px; }
  .footer p { font-size: 11px; letter-spacing: .8px; }
}
@media (max-width: 849px) and (max-height: 720px) {
  .app-shell { padding-top: max(15px, env(safe-area-inset-top)); padding-bottom: max(14px, env(safe-area-inset-bottom)); row-gap: 10px; }
  .brand-logo { width: 116px; height: 53px; }
  .stage { gap: 18px; }
  .security-art { width: 95px; margin-top: -8px; }
  .eyebrow { margin: 5px 0 7px; }
  h1 { font-size: 28px; }
  .intro-description { margin-top: 7px; }
  .query-card { padding: 21px 21px 17px; }
  .input-hint { margin: 7px 0 12px; }
  .input-wrap input { height: 55px; }
  .field-error { margin-top: 5px; margin-bottom: 6px; }
  .submit-button { min-height: 49px; }
  .privacy-note { margin-top: 12px; }
}
@media (max-width: 350px) {
  .app-shell { padding-left: 20px; padding-right: 20px; }
  .official-badge { font-size: 11px; }
  .query-card { padding-left: 18px; padding-right: 18px; }
  .input-wrap input { font-size: 23px; letter-spacing: 2px; padding-left: 41px; padding-right: 31px; }
  .input-symbol { left: 12px; width: 18px; }
  .clear-code { right: 7px; width: 23px; height: 23px; }
  .input-hint { font-size: 13px; }
  .intro-description { font-size: 13px; }
  .result-card { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 849px) and (max-height: 620px) {
  .app-shell { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 49px; }
  .brand-logo { width: 106px; height: 49px; }
  .stage { gap: 14px; }
  .security-art { width: 78px; margin-top: -6px; }
  .eyebrow, .intro-description { display: none; }
  h1 { font-size: 26px; margin-top: 4px; }
  .query-card { padding: 18px 18px 15px; }
  .input-hint { margin: 6px 0 11px; font-size: 13px; }
  .input-wrap input { height: 51px; }
  .submit-button { min-height: 47px; }
  .field-error { margin: 4px 0 6px; }
  .privacy-note { margin-top: 10px; }
}
@media (max-height: 620px) {
  .result-card { padding: 26px 22px 18px; }
  .result-emblem { width: 64px; height: 64px; margin-bottom: 12px; }
  .result-emblem svg { width: 36px; height: 36px; }
  .result-card h2 { font-size: 22px; }
  .result-message { margin-top: 10px; line-height: 1.7; }
  .result-code-block { padding: 11px; margin: 15px 0; gap: 7px; }
  .result-code-block strong { font-size: 21px; }
  .modal-action { margin-top: 16px; min-height: 46px; }
  .result-signature { margin-top: 12px; }
}
body.is-compact .app-shell { width: min(480px, 100%); padding: 12px 22px; row-gap: 8px; }
body.is-compact .brand-logo { width: 102px; height: 46px; }
body.is-compact .topbar { min-height: 0; }
body.is-compact .intro, body.is-compact .footer { display: none; }
body.is-compact .stage { display: flex; flex-direction: column; justify-content: center; gap: 0; }
body.is-compact .query-card { padding: 18px 20px; max-width: 410px; }
body.is-compact .input-hint { margin: 6px 0 10px; font-size: 13px; }
body.is-compact .input-wrap input { height: 49px; }
body.is-compact .field-error { margin: 4px 0; min-height: 20px; }
body.is-compact .submit-button { min-height: 46px; padding: 9px 12px; }
body.is-compact .privacy-note { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
