:root {
    color-scheme: dark;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    color: #fff;
    background: #020617;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --green: #10b981;
    --mint: #34d399;
    --muted: #94a3b8;
    --line: #1e293b;
    --panel: #0f172a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; padding: 16px; display: grid; place-items: center; }
p, h1, h2 { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.landing {
    width: min(100%, 448px);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 25px 50px -12px #0004;
    overflow: hidden;
}
.brand-bar, .brand, .status, .pass-top, .issuer, .pass-middle, .pass-label, .pass-bottom { display: flex; align-items: center; }
.brand-bar { justify-content: space-between; gap: 8px; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.brand { gap: 8px; }
.brand strong { color: var(--mint); font-size: 18px; line-height: 28px; font-weight: 900; letter-spacing: .05em; white-space: nowrap; }
.badge { border: 1px solid #334155; border-radius: 4px; background: #1e293b; color: #aab9cf; padding: 2px 6px; font: 9px/1.5 var(--mono); }
.status {
    flex-shrink: 0;
    gap: 6px;
    border: 1px solid #10b9814d;
    border-radius: 999px;
    background: #1e293b;
    color: var(--mint);
    padding: 4px 10px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}
.status i, .flow-badge i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.status i { position: relative; }
.status i::after { position: absolute; inset: 0; content: ""; border-radius: inherit; background: var(--mint); animation: ping 1s cubic-bezier(0,0,.2,1) infinite; }
.flow-badge i { animation: ping 1s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.intro, .code-stage { display: grid; gap: 20px; }

.pass {
    position: relative;
    width: 100%;
    aspect-ratio: 1.58;
    overflow: hidden;
    border: 1px solid #10b98166;
    border-radius: 16px;
    background: linear-gradient(to top right, #003822, #004e30, #006241);
    box-shadow: 0 20px 50px #00643c59;
}
.gloss {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, #ffffff2e, transparent);
    transform: skewX(-25deg);
    animation: shine 4.5s ease infinite;
    pointer-events: none;
}
@keyframes shine { 0% { left: -100%; } 20%, 100% { left: 100%; } }
.pass-layout { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.pass-top, .pass-middle, .pass-bottom { justify-content: space-between; position: relative; gap: 6px; }
.pass-top { align-items: flex-start; }
.issuer { gap: 12px; }
.brand-mark { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; padding: 2px; border-radius: 50%; background: #fff; box-shadow: 0 10px 15px -3px #0003; }
.emblem { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: #006241; border: 2px solid #fff; box-shadow: 0 0 0 1px #006241; }
.emblem img { filter: brightness(0) invert(1); }
.issuer strong { display: block; font-size: 16px; line-height: 20px; font-weight: 900; letter-spacing: .10em; filter: drop-shadow(0 1px 2px #0005); }
.issuer small { display: block; color: #a7f3d0e6; font: 600 10px/1.5 var(--mono); letter-spacing: .05em; }
.amount { flex: 0 0 auto; min-width: 86px; text-align: right; border: 1px solid #fbbf2466; border-radius: 12px; padding: 6px 12px; background: #0008; backdrop-filter: blur(12px); box-shadow: 0 4px 6px -1px #0003; }
.amount b { color: #fcd34d; font-size: 24px; line-height: 32px; font-weight: 900; }
.amount small { display: block; color: #cbd5e1; font-size: 8px; line-height: 12px; font-weight: 700; letter-spacing: .05em; }
.pass-middle { padding-inline: 4px; margin-block: auto; }
.pass-label { gap: 10px; font: 700 10px/1.5 var(--mono); letter-spacing: .15em; color: #d1fae5; filter: drop-shadow(0 1px 2px #0005); }
.chip {
    flex: 0 0 36px;
    width: 36px;
    height: 28px;
    position: relative;
    border: 1px solid #fcd34d99;
    border-radius: 4px;
    background: linear-gradient(to bottom right, #fde68a, #fbbf24, #d97706);
    box-shadow: 0 4px 6px -1px #0003;
    overflow: hidden;
}
.chip::before, .chip::after { content: ""; position: absolute; background: #92400e66; }
.chip::before { top: 50%; width: 100%; height: 1px; }
.chip::after { left: 50%; width: 1px; height: 100%; }
.code {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #34d39966;
    border-radius: 999px;
    padding: 2px 8px;
    background: #0006;
    backdrop-filter: blur(12px);
    color: #6ee7b7;
    font: 9px/1.5 var(--mono);
    max-width: 52%;
    overflow-wrap: anywhere;
}
.pass-bottom { border-top: 1px solid #34d3994d; padding-top: 8px; align-items: flex-end; }
.pass-number { display: block; font: 900 14px/20px var(--mono); letter-spacing: .25em; filter: drop-shadow(0 1px 2px #0005); }
.pass-bottom small { display: block; color: #a7f3d0e6; font-size: 9px; line-height: 1.5; font-weight: 500; letter-spacing: .025em; margin-top: 2px; }
.locked { display: flex; align-items: center; gap: 4px; flex-shrink: 0; background: #0008; backdrop-filter: blur(12px); border: 1px solid #fbbf244d; padding: 4px 10px; border-radius: 8px; color: #fcd34d; font-size: 10px; line-height: 1.5; font-weight: 700; box-shadow: 0 4px 6px -1px #0002; }

.preview-lock { position: relative; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #020617; padding: 14px; }
.lock-pattern { text-align: center; filter: blur(4px); opacity: .5; user-select: none; pointer-events: none; }
.lock-pattern div { color: #94a3b8; font: 12px/16px var(--mono); letter-spacing: .30em; }
.lock-pattern strong { display: block; margin-top: 4px; color: var(--mint); font-size: 12px; line-height: 16px; letter-spacing: .10em; }
.lock-overlay { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; background: #02061766; }
.lock-label { display: flex; align-items: center; gap: 6px; border: 1px solid #334155; border-radius: 999px; background: #0f172a; padding: 4px 12px; color: #fcd34d; font-size: 12px; line-height: 16px; font-weight: 500; text-align: center; }
.preview-copy { text-align: center; }
.preview-copy p { font-size: 12px; line-height: 16px; font-weight: 500; color: #cbd5e1; }
.timer { display: inline-block; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; color: var(--mint); background: #020617; font: 12px/16px var(--mono); }
.primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    box-shadow: 0 10px 15px -3px #10b98140, 0 4px 6px -4px #10b98140;
    color: #020617;
    font-size: 16px;
    line-height: 24px;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    padding: 14px 0;
    transition: background .2s;
}
.primary:hover { background: #34d399; }
.code-lead { text-align: center; }
.code-lead h1 { font-size: 18px; line-height: 28px; font-weight: 700; }
.code-lead p { color: var(--muted); font-size: 12px; line-height: 16px; margin-top: 4px; }
.field-shell { display: flex; align-items: center; gap: 8px; background: #020617; border: 1px solid #334155; border-radius: 12px; padding: 12px 16px; }
.field-shell:focus-within { border-color: var(--mint); }
.field-shell > span:first-child { color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 600; }
.field-shell input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; padding: 0; color: #fff; font: 14px/20px var(--mono); letter-spacing: .05em; }
.field-shell input::placeholder { color: #7d8da6; }
.field-error { margin-top: 12px; color: #fb7185; font-size: 12px; line-height: 16px; }
.code-stage .primary { margin-top: 20px; font-weight: 700; }

.flow-card { border: 1px solid var(--line); border-radius: 16px; background: #020617; padding: 24px; text-align: center; animation: breathe 2.5s ease infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 15px #10b98133; } 50% { box-shadow: 0 0 30px #10b98180; } }
.flow-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid #1e293bcc; color: var(--muted); font-size: 12px; line-height: 16px; }
.flow-line strong { font: 700 12px/16px var(--mono); color: #6ee7b7; overflow-wrap: anywhere; }
.flow-badge { display: flex; align-items: center; gap: 6px; flex-shrink: 0; background: #022c22cc; color: var(--mint); border: 1px solid #10b9814d; border-radius: 999px; padding: 2px 10px; font: 11px/1.5 var(--mono); }
.flow-badge i { width: 6px; height: 6px; }
.flow-badge i.complete { animation: none; }
.flow-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 16px auto; color: var(--mint); background: #022c2299; border: 1px solid #10b98166; border-radius: 16px; box-shadow: 0 10px 15px -3px #022c22; }
.spinner { width: 32px; height: 32px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flow-message { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.flow-message h1 { font-size: 18px; line-height: 28px; font-weight: 900; letter-spacing: .025em; }
.flow-message p { color: var(--muted); font: 12px/1.625 var(--mono); letter-spacing: .025em; }
.flow-meter { margin-top: 20px; text-align: left; }
.flow-meter > div { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font: 11px/1.5 var(--mono); margin-bottom: 6px; }
.flow-meter strong { color: var(--mint); }
progress { display: block; width: 100%; height: 10px; appearance: none; border: 1px solid var(--line); border-radius: 999px; padding: 1px; background: var(--panel); overflow: hidden; accent-color: var(--green); }
progress::-webkit-progress-bar { background: var(--panel); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(to right,#10b981,#2dd4bf,#fbbf24); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(to right,#10b981,#2dd4bf,#fbbf24); border-radius: 999px; }
.ready { margin-top: 24px; padding-top: 8px; }
.ready p { color: var(--muted); margin-top: 12px; font-size: 11px; }
.launch-button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid #6ee7b780; border-radius: 16px; background: linear-gradient(to right,#10b981,#34d399,#2dd4bf); color: #020617; box-shadow: 0 10px 30px -5px #10b98159; text-align: left; text-decoration: none; }
.help-link { border: 0; background: transparent; padding: 0; color: var(--muted); }
.help-link:hover { text-decoration: underline; }
.launch-icon, .launch-arrow { display: grid; place-items: center; flex: 0 0 auto; background: #02061726; }
.launch-icon { width: 40px; height: 40px; border: 1px solid #fff3; border-radius: 12px; }
.launch-arrow { width: 28px; height: 28px; border-radius: 8px; }
.launch-copy { flex: 1; }
.launch-copy strong { display: block; font-size: 16px; line-height: 20px; font-weight: 900; letter-spacing: -.025em; }
.launch-copy small { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: #022c22; }
.flow-footer { display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid #1e293b99; margin-top: 20px; padding-top: 12px; color: #8797af; font-size: 10px; }

footer { margin-top: 24px; border-top: 1px solid #1e293bcc; padding-top: 16px; text-align: center; font-size: 9px; line-height: 1.5; color: #8493aa; }
.legal { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.legal button, .text-button { border: 0; background: transparent; color: inherit; padding: 0; }
.legal button:hover, .text-button:hover { text-decoration: underline; }
footer p { margin-top: 4px; }
dialog { width: min(100% - 32px, 384px); border: 1px solid #334155; border-radius: 16px; background: var(--panel); color: #fff; padding: 20px; box-shadow: 0 25px 50px -12px #0008; }
dialog::backdrop { background: #000c; backdrop-filter: blur(4px); }
dialog h2 { font-size: 14px; line-height: 20px; font-weight: 700; }
dialog p { color: #cbd5e1; line-height: 1.55; font-size: 12px; margin-top: 8px; }
dialog form { margin-top: 12px; text-align: center; }
.secondary { width: 100%; border: 0; border-radius: 8px; color: #e2e8f0; background: #1e293b; padding: 8px; font-size: 12px; font-weight: 600; }
.app-dialog { border-radius: 24px; border-color: #1e293b; }
.dialog-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dialog-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #10b98166; border-radius: 12px; background: #022c22; color: var(--mint); font-size: 20px; }
.dialog-title p { font-size: 11px; margin-top: 1px; color: var(--muted); }
.install-steps { display: grid; gap: 10px; background: #020617; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.install-steps p { margin: 0; font-size: 11px; }
.install-steps > div { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: #0f172ae6; padding: 10px; font-size: 12px; color: #cbd5e1; }
.install-steps b { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; color: var(--mint); background: #1e293b; font-size: 10px; }
.install-steps > div:nth-of-type(2) b { color: #020617; background: var(--green); }
.install-steps strong { color: #6ee7b7; }
.install-steps .install-note { padding-top: 4px; color: #8797af; font-size: 10px; }
.app-dialog .primary { margin-top: 12px; min-height: 44px; padding-block: 12px; font-size: 14px; line-height: 20px; font-weight: 900; background: linear-gradient(to right,#10b981,#2dd4bf); }
.text-button { padding: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.demo-toast {
    position: fixed;
    z-index: 10;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #10b9814d;
    border-radius: 12px;
    background: #0f172af2;
    padding: 10px 14px;
    box-shadow: 0 25px 50px -12px #0004;
    opacity: 0;
    transform: translateY(16px);
    transition: transform .5s, opacity .5s;
    pointer-events: none;
}
.demo-toast.visible { opacity: 1; transform: translateY(0); }
.toast-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 50%; border: 1px solid #10b98166; background: #022c22; font-size: 12px; }
.demo-toast b { display: block; color: #e2e8f0; font-size: 12px; font-weight: 500; }
.demo-toast small { display: block; color: var(--mint); font-size: 10px; font-weight: 500; }
@media (min-width: 640px) {
    .demo-toast { left: 24px; right: auto; width: 264px; }
}

@media (max-width: 479px) {
    .pass-bottom > div { max-width: 66%; }
    .locked { width: 86px; }
    .locked > span:last-child { max-width: 42px; }
}
@media (max-width: 365px) {
    .landing { padding: 19px; }
    .brand strong { font-size: 15px; }
    .badge, .status { padding-inline: 5px; }
    .pass-layout { padding: 12px; }
    .issuer { gap: 7px; }
    .issuer strong { font-size: 13px; }
    .issuer small, .pass-label { font-size: 9px; }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
    .emblem img { width: 21px; height: 21px; }
    .amount { min-width: 62px; padding: 3px 7px; }
    .amount b { font-size: 20px; line-height: 26px; }
    .pass-number { font-size: 12px; }
    .locked { width: auto; padding-inline: 6px; }
    .lock-label { font-size: 11px; padding-inline: 8px; }
    .flow-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
