:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #22352f;
  background: #f6f7f3;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --accent: #276552;
  --accent-soft: #eaf3ed;
  --muted: #7c8983;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100vh; min-height: 100svh; font-size: 14px; background: radial-gradient(ellipse at 95% 7%, #e9f0e8 0, transparent 43%), #f6f7f3; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #90b4a3; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .5; }
.page-shell { width: min(100%, 504px); margin: 0 auto; padding: max(26px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: .04em; color: inherit; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 6px); gap: 3px; padding: 9px; border-radius: 10px; background: var(--accent); }
.brand-mark span { width: 6px; height: 6px; border: 1.5px solid #eff6ee; border-radius: 1px; }
.brand-mark span:last-child { border: 0; background: #b8d0a7; }
.connection { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 5px 9px; border: 1px solid #dce4dc; border-radius: 20px; color: #7b8781; font-size: 12px; white-space: nowrap; background: #ffffff70; }
.connection-dot, .status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 100%; background: currentColor; flex: none; }
.connection[data-kind="live"] { color: #47765d; border-color: #d7e6d7; }
.connection[data-kind="offline"] { color: #9a7557; border-color: #e7dbcf; }
.intro { padding: 29px 1px 25px; }
.eyebrow { font-size: 12px; color: #758579; letter-spacing: .1em; margin: 0 0 12px; }
h1 { margin: 0; font-size: clamp(25px, 7vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -.035em; }
.intro-description { font-size: 14px; line-height: 1.8; color: #718177; margin: 11px 0 0; }
.demo-banner { display: flex; align-items: center; gap: 10px; background: #eeeeda; color: #7c7847; padding: 12px 15px; border-radius: 12px; margin-bottom: 14px; }
.demo-icon { width: 25px; height: 25px; display: grid; place-items: center; background: #e5e5cb; border-radius: 50%; font-size: 17px; flex: none; }
.demo-banner strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.demo-banner span:not(.demo-icon) { display: block; font-size: 12px; line-height: 1.5; }
.auth-card { padding: 23px 23px 0; border-radius: 20px; background: #fff; border: 1px solid #e2e8df; box-shadow: 0 8px 35px #334d3d05, 0 1px 3px #334d3d03; overflow: hidden; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-label { display: inline-flex; align-items: center; gap: 6px; color: #6b7c71; background: #f0f4ef; border-radius: 6px; font-size: 12px; padding: 5px 7px; }
.status-label[data-kind="waiting"], .status-label[data-kind="authenticated"] { color: #427158; background: #ecf4ec; }
.status-label[data-kind="expired"], .status-label[data-kind="offline"], .status-label[data-kind="cancelled"] { color: #986f4d; background: #f7f0e8; }
.status-label[data-kind="checking"] { color: #6a7c85; background: #edf3f5; }
.updated-at { font-size: 12px; color: #7f8c82; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.45; margin: 18px 0 5px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.challenge-description { font-size: 14px; line-height: 1.8; color: #718176; margin: 0; min-height: 20px; }
.site { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; color: #7f8f82; max-width: 100%; }
.site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-frame { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 262px); margin: 23px auto 0; padding: 15px; background: #fff; border: 1px solid #e8ece5; border-radius: 14px; }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; pointer-events: none; width: 18px; height: 18px; border-color: #88a08e; border-style: solid; border-radius: 3px; }
.qr-frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.qr-frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.qr-frame[data-kind="authenticated"] { background: #f5f9f3; border-color: #e3ecdd; }
.qr-frame[data-kind="offline"], .qr-frame[data-kind="expired"], .qr-frame[data-kind="cancelled"] { background: #fafaf7; }
.qr-image { display: block; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; border-radius: 2px; -webkit-touch-callout: default; }
.qr-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 95%; padding: 10px; }
.placeholder-symbol { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 0 4px; border-radius: 50%; background: #eef2eb; color: #78916f; font-size: 25px; font-weight: 400; }
.placeholder-symbol[data-kind="authenticated"] { background: #e5efdf; color: #4d7848; }
.placeholder-symbol[data-kind="expired"], .placeholder-symbol[data-kind="offline"], .placeholder-symbol[data-kind="cancelled"] { background: #f0eee7; color: #a38a6a; }
.qr-placeholder strong { font-size: 15px; font-weight: 550; color: #58705c; line-height: 1.5; }
.qr-placeholder > span:last-child { color: #7a8a76; font-size: 12px; line-height: 1.7; }
.spinner { width: 18px; height: 18px; border: 1.6px solid #b6c7ae; border-top-color: #507e5b; border-radius: 50%; animation: spin .8s linear infinite; }
.qr-caption { text-align: center; font-size: 12px; color: #7b8c7a; min-height: 36px; margin: 12px 0 16px; line-height: 1.8; }
.actions { display: grid; gap: 9px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 10px; font-size: 14px; font-weight: 500; padding: 11px 14px; border: 1px solid transparent; transition: background .15s, transform .15s; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-primary { color: #f4f7ed; background: var(--accent); border-color: var(--accent); }
.button-primary:hover:not(:disabled) { background: #1e5846; }
.button-secondary { color: #6c8070; background: #fff; border-color: #e2e8de; }
.button-secondary:hover:not(:disabled) { background: #f6f8f3; }
.reconnect-button { margin-top: 3px; margin-bottom: 23px; }
.feedback { font-size: 13px; line-height: 1.8; color: #687e63; text-align: center; padding: 0 4px; margin: 12px 0; }
.feedback[data-kind="error"] { color: #aa6c4b; }
.progress { padding: 20px 0 22px; margin: 4px 0 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.progress li { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #8b9986; flex: 1; position: relative; white-space: nowrap; }
.progress li:not(:last-child)::after { content: ""; display: block; flex: 1; height: 1px; background: #e5eade; margin-left: 2px; }
.progress li:last-child { flex: initial; }
.step-number { width: 17px; height: 17px; border-radius: 50%; background: #f2f5ed; color: #7d9270; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; flex: none; }
.progress li.is-active { color: #5c7a56; }
.progress li.is-active .step-number { background: #e9f0e1; color: #64825a; }
.progress li.is-complete { color: #7b9470; }
.progress li.is-complete .step-number { background: #e9f0e1; color: #64825a; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #edf0e8; padding: 13px 23px; margin: 0 -23px; color: #809176; font-size: 11px; background: #fdfefb; }
.text-button { border: 0; padding: 8px 0; background: none; color: #76876b; font-size: 12px; flex: none; }
.text-button:hover:not(:disabled) { color: #536c49; }
.usage-note { display: flex; align-items: flex-start; gap: 9px; margin: 19px 5px 0; color: #9aa492; }
.note-icon { width: 13px; height: 13px; border: 1px solid #b2bba8; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 8px; font-family: Georgia, serif; font-style: italic; flex: none; margin-top: 2px; }
.usage-note p { font-size: 12px; line-height: 1.8; margin: 0; color: #7d8d74; }
.page-footer { text-align: center; font-size: 11px; color: #8f9e83; margin-top: 25px; letter-spacing: .03em; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 540px) { .page-shell { padding-top: 36px; } .intro { padding-top: 36px; } h1 { font-size: 30px; } .auth-card { padding: 27px 30px 0; } .card-footer { margin: 0 -30px; padding-inline: 30px; } .qr-frame { width: 270px; } }
@media (max-width: 340px) { .page-shell { padding-inline: 16px; } .auth-card { padding-inline: 17px; } .card-footer { margin-inline: -17px; padding-inline: 17px; } .progress li { font-size: 8px; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } .button { transition: none; } }
