:root {
    --night: #070a24;
    --abyss: #04061a;
    --ink: #f3f5fd;
    --mist: #bec7df;
    --haze: #8f9abb;
    --cyan: #41eafa;
    --violet: #8b46e8;
    --coral: #ff6b8b;
    --line: rgba(170, 176, 207, 0.13);
    --line-strong: #303953;
    --field: #090e27;
    --grad-line: linear-gradient(110deg, #41eafa, #5fb4ff 50%, #8b46e8);
    --grad-brand: linear-gradient(135deg, #41eafa, #8b46e8);
    --grad-coral: linear-gradient(135deg, #ff9aac, #ff5c7a);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --text: 'IBM Plex Sans Arabic', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: radial-gradient(120% 90% at 50% 0%, #0c1140 0%, var(--night) 50%, var(--abyss) 100%) var(--abyss) fixed;
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--text);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

::selection {
    background: rgba(65, 234, 250, 0.3);
}

.i {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.is-booting .topbar,
.is-booting .stage,
.is-booting .footer,
.is-booting .ambient {
    opacity: 0;
}

.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, rgba(7, 10, 36, 0.55) 30%, rgba(4, 6, 26, 0.75) 100%);
}

.ambient-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.ambient-plate {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.glow-alert {
    display: block;
    width: 60vmax;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(closest-side, rgba(255, 107, 139, 0.2), rgba(255, 107, 139, 0));
}

.grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1184px;
    margin: 0 auto;
    padding: 22px clamp(16px, 3vw, 32px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: auto;
    height: 30px;
}

.brand-name {
    font-weight: 700;
    font-size: 19px;
    line-height: 1;
}

.brand-rule {
    width: 1px;
    height: 18px;
    margin-inline: 2px;
    background: var(--line-strong);
}

.brand-sub {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--mist);
}

.topnav {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(20, 27, 70, 0.75), rgba(10, 14, 44, 0.75)) padding-box,
        linear-gradient(120deg, rgba(65, 234, 250, 0.3), rgba(170, 176, 207, 0.1) 40%, rgba(139, 70, 232, 0.3)) border-box;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--mist);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.nav-btn:hover {
    background: rgba(170, 176, 207, 0.08);
    color: var(--ink);
}

.nav-short {
    display: none;
}

.toasts {
    position: fixed;
    bottom: calc(22px + env(safe-area-inset-bottom));
    inset-inline: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.toast-slot {
    overflow: clip;
    overflow-clip-margin: 24px;
}

.toast {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 420px);
    margin-top: 10px;
    padding: 10px 18px;
    border-radius: 14px;
    background: rgba(16, 21, 60, 0.94);
    border: 1px solid var(--line-strong);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.toast::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--grad-brand);
}

.toast-error::before {
    background: var(--grad-coral);
}

.stage {
    flex: 1;
    display: grid;
    align-content: center;
    width: 100%;
    max-width: 1184px;
    margin: 0 auto;
    padding: clamp(4px, 2vh, 24px) clamp(12px, 3vw, 32px) 28px;
}

.card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "steps art"
        "main art";
    width: 100%;
    max-width: 1120px;
    min-height: 552px;
    margin: 0 auto;
    border-radius: 24px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, #0f1536, #0b1030) padding-box,
        linear-gradient(150deg, rgba(65, 234, 250, 0.3), #252d49 26%, #252d49 74%, rgba(139, 70, 232, 0.3)) border-box;
    box-shadow: 0 60px 120px -60px rgba(0, 0, 0, 0.95);
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.card-steps,
.card-main {
    width: 100%;
    max-width: 500px;
    justify-self: center;
}

.card-steps {
    grid-area: steps;
    padding: 40px 40px 0;
}

.card-main {
    grid-area: main;
    padding: 34px 40px 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
}

.step {
    display: grid;
    gap: 11px;
    min-width: 0;
}

.step-bar {
    position: relative;
    height: 2px;
    border-radius: 2px;
    background: #303853;
    overflow: hidden;
}

.step-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #41eafa, #8b46e8);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s var(--ease);
}

[dir="rtl"] .step-fill {
    background: linear-gradient(270deg, #41eafa, #8b46e8);
    transform-origin: right center;
}

.step.is-current .step-fill {
    transform: scaleX(0.42);
}

.step.is-current .step-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: glint 2.6s var(--ease) infinite;
}

[dir="rtl"] .step.is-current .step-bar::after {
    left: auto;
    right: 0;
    animation-name: glint-rtl;
}

.step.is-done .step-fill,
.step.is-failed .step-fill {
    transform: scaleX(1);
}

.step.is-failed .step-fill {
    background: var(--grad-coral);
}

.step-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--haze);
    white-space: nowrap;
    transition: color 0.7s var(--ease);
}

.step-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    font-size: 10.5px;
    font-weight: 600;
    transition: background-color 0.7s var(--ease), border-color 0.7s var(--ease), color 0.7s var(--ease);
}

.step-num,
.step-check {
    grid-area: 1 / 1;
    transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.step-num {
    line-height: 1;
}

.step-check {
    width: 12px;
    height: 12px;
    stroke-width: 2.8;
    opacity: 0;
    transform: scale(0.5);
}

.step.is-current .step-label {
    color: var(--ink);
}

.step.is-current .step-mark {
    border-color: var(--cyan);
    color: var(--cyan);
}

.step.is-done .step-label {
    color: var(--haze);
}

.step.is-done .step-mark {
    background: var(--grad-brand);
    border-color: transparent;
    color: #061033;
}

.step.is-done .step-num {
    opacity: 0;
    transform: scale(0.5);
}

.step.is-done .step-check {
    opacity: 1;
    transform: none;
}

.step.is-failed .step-label,
.step.is-failed .step-mark {
    color: var(--coral);
}

.step.is-failed .step-mark {
    border-color: var(--coral);
}

.card-body.is-sizing {
    overflow: clip;
    overflow-clip-margin: 32px;
}

.view {
    display: none;
}

.view.is-active {
    display: block;
}

.view-title {
    font-weight: 700;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

[dir="rtl"] .view-title {
    line-height: 1.4;
    letter-spacing: 0;
}

.view-lead {
    margin-top: 8px;
    max-width: 40ch;
    font-size: 16px;
    line-height: 1.625;
    color: var(--mist);
}

.view-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--haze);
}

.view-foot .i {
    width: 16px;
    height: 16px;
}

.form {
    display: grid;
    gap: 24px;
    margin-top: 32px;
}

.field {
    display: grid;
    gap: 9px;
}

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-label {
    font-size: 13px;
    line-height: 20px;
    font-weight: 500;
    color: var(--mist);
}

.field-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    font-size: 12.5px;
    color: var(--haze);
    transition: color 0.4s var(--ease);
}

.field-help:hover {
    color: var(--cyan);
}

.field-help .i {
    width: 15px;
    height: 15px;
}

.field-control {
    position: relative;
}

.field-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 17px;
    translate: 0 -50%;
    color: var(--haze);
    pointer-events: none;
    transition: color 0.45s var(--ease);
}

.field-control:focus-within .field-icon {
    stroke: url(#g-brand);
}

.field-control::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: var(--grad-line);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}

.field-control:focus-within::after {
    opacity: 1;
}

.field.is-invalid .field-control::after {
    background: var(--grad-coral);
    opacity: 1;
}

.field input {
    width: 100%;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(180deg, #0c122f, #080c24);
    border: 1px solid var(--line-strong);
    font-size: 16px;
    outline: none;
    transition: border-color 0.4s var(--ease), box-shadow 0.5s var(--ease);
}

html[dir="ltr"] .field input {
    padding: 0 16px 0 46px;
}

html[dir="rtl"] .field input {
    padding: 0 46px 0 16px;
    text-align: right;
}

.field input::placeholder {
    color: #6f7a9c;
    opacity: 1;
}

.field input:hover {
    border-color: #3d4766;
}

.field input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(65, 234, 250, 0.07), 0 10px 26px -14px rgba(95, 180, 255, 0.55);
}

.field.is-invalid input {
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(255, 107, 139, 0.08);
}

.field.is-invalid .field-icon {
    color: var(--coral);
}

.input-order {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.btn-primary {
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    height: 56px;
    margin-top: 4px;
    border-radius: 14px;
    color: #061033;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.4s var(--ease);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 12px 10% -4px;
    z-index: -2;
    border-radius: inherit;
    background: var(--grad-line);
    filter: blur(16px);
    opacity: 0.42;
    transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(100deg, #41eafa 0%, #5fb4ff 42%, #8a7dff 72%, #41eafa 100%);
    background-size: 220% 100%;
    background-position: 0% 50%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(6, 16, 51, 0.2);
    transition: background-position 0.9s var(--ease);
}

.btn-primary:hover::after {
    background-position: 58% 50%;
}

.btn-primary:hover::before {
    opacity: 0.7;
    translate: 0 2px;
}

.btn-primary:active {
    transform: scale(0.99);
    transition-duration: 0.15s;
}

.btn-inner {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.btn-inner > * {
    grid-area: 1 / 1;
}

.btn-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s var(--ease), transform 0.5s var(--ease);
}

.btn-label .i {
    stroke-width: 2.2;
}

.btn-spinner {
    position: relative;
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s var(--ease), transform 0.5s var(--ease);
}

.btn-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(5, 10, 42, 0.22);
    border-top-color: #050a2a;
    animation: spin 0.8s linear infinite;
}

.btn-primary.is-loading {
    pointer-events: none;
}

.btn-primary.is-loading .btn-label {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-primary.is-loading .btn-spinner {
    opacity: 1;
    transform: none;
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.choice {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 4px;
    min-height: 156px;
    padding: 22px 20px 20px;
    border-radius: 18px;
    text-align: start;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, #121a44, #0a0f2c 70%) padding-box,
        linear-gradient(165deg, rgba(170, 176, 207, 0.26), rgba(170, 176, 207, 0.06)) border-box;
    transition: transform 0.5s var(--ease);
}

.choice::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, #41eafa, #5fb4ff 45%, #8b46e8);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
}

.choice::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background:
        radial-gradient(130% 90% at 100% 0%, rgba(65, 234, 250, 0.16), transparent 60%),
        radial-gradient(130% 90% at 0% 100%, rgba(139, 70, 232, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

[dir="ltr"] .choice::after {
    background:
        radial-gradient(130% 90% at 0% 0%, rgba(65, 234, 250, 0.16), transparent 60%),
        radial-gradient(130% 90% at 100% 100%, rgba(139, 70, 232, 0.2), transparent 60%);
}

.choice:hover {
    transform: translateY(-2px);
}

.choice:hover::before,
.choice:hover::after,
.choice:focus-visible::before {
    opacity: 1;
}

.choice:active {
    transform: scale(0.985);
    transition-duration: 0.15s;
}

.choice-glyph {
    margin-bottom: 16px;
    transition: translate 0.5s var(--ease);
}

.choice-glyph .i {
    width: 32px;
    height: 32px;
    stroke: url(#g-brand);
    stroke-width: 1.6;
}

.choice:hover .choice-glyph {
    translate: 0 -2px;
}

.choice strong {
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.45;
}

.choice small {
    font-size: 13px;
    line-height: 1.5;
    color: var(--mist);
}

.wait-head {
    display: flex;
    align-items: center;
    gap: 22px;
}

.ring {
    position: relative;
    flex: none;
    width: 76px;
    height: 76px;
}

.ring svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring circle {
    fill: none;
    stroke-width: 5;
}

.ring-track {
    stroke: rgba(170, 176, 207, 0.12);
}

.ring-scan {
    stroke: rgba(65, 234, 250, 0.35);
    stroke-linecap: round;
    stroke-dasharray: 7 93;
    transform-box: fill-box;
    transform-origin: center;
    animation: spin 2.6s linear infinite;
}

.ring-fill {
    stroke: url(#ring-grad);
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.ring-time {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    direction: ltr;
    font-weight: 500;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.wait-copy {
    min-width: 0;
}

.wait-copy .view-title {
    font-size: clamp(22px, 2.4vw, 27px);
}

.checklist {
    list-style: none;
    margin-top: 28px;
    border-top: 1px solid var(--line);
}

.check {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    font-size: 14.5px;
    color: var(--haze);
    border-bottom: 1px solid var(--line);
    transition: color 0.6s var(--ease);
}

.check-mark {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--cyan);
    transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease);
}

.check-mark .i {
    width: 11px;
    height: 11px;
    stroke-width: 3;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.check-spin {
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--cyan);
    opacity: 0;
    animation: spin 0.9s linear infinite;
    transition: opacity 0.4s var(--ease);
}

.check.is-done {
    color: var(--mist);
}

.check.is-done .check-mark {
    background: var(--grad-brand);
    border-color: transparent;
    color: #061033;
}

.check.is-done .check-mark .i {
    opacity: 1;
    transform: none;
}

.check.is-active {
    color: var(--ink);
}

.check.is-active .check-mark {
    border-color: rgba(65, 234, 250, 0.18);
}

.check.is-active .check-spin {
    opacity: 1;
}

.result-head {
    display: flex;
    align-items: center;
    gap: 18px;
}

.seal {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    background:
        radial-gradient(circle at 32% 28%, rgba(65, 234, 250, 0.3), rgba(139, 70, 232, 0.24) 72%) padding-box,
        conic-gradient(from 210deg, #41eafa, #5fb4ff, #8b46e8, #41eafa) border-box;
    box-shadow: 0 10px 28px -10px rgba(95, 180, 255, 0.6);
}

.seal::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 50%;
    border: 1.5px solid rgba(95, 180, 255, 0.7);
    opacity: 0;
    pointer-events: none;
}

.seal.is-ripple::after {
    animation: ripple 1s var(--ease) 0.45s;
}

.seal-error {
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 154, 172, 0.28), rgba(255, 92, 122, 0.2) 72%) padding-box,
        conic-gradient(from 210deg, #ff9aac, #ff5c7a, #ff9a6b, #ff9aac) border-box;
    box-shadow: 0 10px 28px -10px rgba(255, 92, 122, 0.55);
}

.seal-error::after {
    border-color: rgba(255, 107, 139, 0.7);
}

.seal-mark {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.seal-draw {
    stroke-dasharray: 1;
}

.error-note {
    margin-top: 16px;
    padding-inline-start: 14px;
    border-inline-start: 3px solid;
    border-image: var(--grad-coral) 1;
    font-size: 15px;
    line-height: 1.65;
    color: var(--mist);
}

.code {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 28px;
}

.code-char {
    display: grid;
    place-items: center;
    height: 64px;
    border-radius: 12px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, #111842, #080c26) padding-box,
        linear-gradient(165deg, rgba(65, 234, 250, 0.5), rgba(95, 180, 255, 0.18) 45%, rgba(139, 70, 232, 0.45)) border-box;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 30px;
    overflow: hidden;
    transition: border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.code-char span {
    display: block;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff, #c9d3f2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.code.is-flash .code-char {
    box-shadow: 0 0 0 3px rgba(95, 180, 255, 0.14), 0 10px 24px -12px rgba(95, 180, 255, 0.6);
}

.btn-copy {
    margin-top: 14px;
}

.copy-face {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.35s var(--ease), transform 0.55s var(--ease);
}

.copy-face .i {
    stroke-width: 2.2;
}

.copy-done {
    opacity: 0;
    transform: translateY(16px);
}

.btn-copy.is-copied .copy-idle {
    opacity: 0;
    transform: translateY(-16px);
}

.btn-copy.is-copied .copy-done {
    opacity: 1;
    transform: none;
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px auto 0;
    padding: 4px 2px;
    font-size: 14px;
    color: var(--mist);
    transition: color 0.4s var(--ease);
}

.btn-link .i {
    width: 16px;
    height: 16px;
    transition: transform 0.7s var(--ease);
}

.btn-link:hover {
    color: var(--cyan);
}

.btn-link:hover .i {
    transform: rotate(-120deg);
}

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    margin-top: 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--mist);
    transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.btn-ghost .i {
    width: 16px;
    height: 16px;
}

.btn-ghost:hover {
    color: var(--ink);
    background: rgba(170, 176, 207, 0.06);
}

.help {
    margin-top: 26px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(165deg, #10173f, #090d28 70%) padding-box,
        linear-gradient(165deg, rgba(170, 176, 207, 0.24), rgba(170, 176, 207, 0.05)) border-box;
}

.help-title {
    font-weight: 600;
    font-size: 14.5px;
}

.help-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    border-radius: 13px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, #121940, #0a0e2a) padding-box,
        linear-gradient(140deg, rgba(170, 176, 207, 0.3), rgba(170, 176, 207, 0.1)) border-box;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.4s var(--ease), translate 0.4s var(--ease);
}

.help-link:hover {
    background:
        linear-gradient(180deg, #141c4a, #0c1131) padding-box,
        linear-gradient(140deg, #41eafa, #5fb4ff 50%, #8b46e8) border-box;
    translate: 0 -1px;
}

.help-link:hover .i {
    stroke: url(#g-brand);
}

.help-hours {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--haze);
}

.card-art {
    grid-area: art;
}

.art {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-start-end-radius: 23px;
    border-end-end-radius: 23px;
    border-inline-start: 1px solid #1d2442;
    background: radial-gradient(110% 80% at 50% 0%, rgba(32, 42, 118, 0.5), rgba(5, 8, 30, 0) 70%), #060922;
}

.art-plate {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 60%;
}

.art::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(to top, rgba(6, 9, 34, 0.94) 18%, rgba(6, 9, 34, 0));
    pointer-events: none;
}

.art-glow {
    position: absolute;
    top: 42%;
    left: 50%;
    width: 80%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(65, 234, 250, 0.14), rgba(139, 70, 232, 0.1) 55%, transparent);
    transition: scale 1.6s var(--ease);
}

.art-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(closest-side, rgba(255, 107, 139, 0.24), transparent);
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}

.art[data-mood="waiting"] .art-glow {
    animation: breathe 3.2s ease-in-out infinite;
}

.art[data-mood="success"] .art-glow {
    scale: 1.15;
}

.art[data-mood="error"] .art-glow::after {
    opacity: 1;
}

.art-stage {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 48px 40px 28px;
}

.art-mark {
    width: min(72%, 340px);
}

.emblem {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    animation: float 8s ease-in-out infinite;
}

.em-outline {
    fill: none;
    stroke: rgba(170, 176, 207, 0.16);
    stroke-width: 1.25;
    stroke-linejoin: round;
    stroke-dasharray: 100;
    vector-effect: non-scaling-stroke;
    transition: stroke 0.8s var(--ease), fill 0.8s var(--ease);
}

.em-fill {
    opacity: 0.11;
    transition: opacity 1.3s var(--ease);
}

.em-trace {
    fill: none;
    stroke: url(#em-line);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 88;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.6s var(--ease);
}

.em-part.is-active .em-trace,
.em-part.is-failed .em-trace {
    animation: trace 3.2s linear infinite;
}

.em-part.is-lit .em-fill {
    opacity: 1;
}

.em-part.is-lit .em-outline {
    stroke: transparent;
}

.em-part.is-active .em-outline {
    stroke: rgba(65, 234, 250, 0.4);
}

.em-part.is-active .em-fill {
    opacity: 0.2;
}

.em-part.is-active .em-trace,
.em-part.is-failed .em-trace {
    opacity: 1;
}

.art[data-mood="waiting"] .em-part.is-active .em-trace {
    animation-duration: 1.8s;
}

.em-part.is-failed .em-outline {
    stroke: rgba(255, 107, 139, 0.65);
}

.em-part.is-failed .em-trace {
    stroke: var(--coral);
}

.art-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin: 0 40px;
    padding: 18px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.stat {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.stat strong {
    justify-self: start;
    background: var(--grad-line);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
}

.stat small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--mist);
}

.footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1184px;
    margin: 0 auto;
    padding: 18px clamp(16px, 3vw, 32px) calc(20px + env(safe-area-inset-bottom));
    font-size: 13px;
    color: var(--haze);
}

.trust {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.4s var(--ease);
}

.trust:hover {
    color: var(--mist);
}

.trust .i {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

.support {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-hours {
    margin-inline-end: 6px;
}

.support-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(14, 19, 56, 0.6);
    border: 1px solid var(--line);
    color: var(--mist);
    transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.support-btn:hover {
    color: var(--ink);
    border-color: var(--line-strong);
    background: rgba(170, 176, 207, 0.08);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes glint {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(260%);
    }
}

@keyframes glint-rtl {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-260%);
    }
}

@keyframes float {
    50% {
        transform: translateY(-10px);
    }
}

@keyframes ripple {
    from {
        opacity: 0.9;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(1.6);
    }
}

@keyframes breathe {
    50% {
        scale: 1.12;
    }
}

@keyframes trace {
    to {
        stroke-dashoffset: -100;
    }
}

@media (max-width: 960px) {
    .stage {
        max-width: 600px;
        align-content: start;
    }

    .card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "steps"
            "main";
        min-height: 0;
        border-radius: 26px;
    }

    .card-art {
        display: none;
    }

    .card-steps {
        padding: 28px 28px 0;
    }

    .card-main {
        padding: 28px 28px 32px;
    }
}

@media (max-width: 760px) {
    .footer {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
        text-align: center;
    }

    .trust,
    .support {
        justify-self: center;
    }

    .support {
        order: -1;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 14px 16px;
    }

    .brand-rule,
    .brand-sub,
    .nav-long {
        display: none;
    }

    .nav-short {
        display: inline;
    }

    .nav-btn {
        min-width: 44px;
        height: 44px;
        padding: 0 12px;
        justify-content: center;
    }

    .stage {
        padding: 8px 16px 0;
    }

    .card-steps {
        padding: 22px 20px 0;
    }

    .card-main {
        padding: 24px 20px 24px;
    }

    .footer {
        padding-top: 32px;
    }

    .support-btn {
        width: 44px;
        height: 44px;
    }

    .steps {
        gap: 7px;
    }

    .step-label {
        gap: 6px;
        font-size: 12px;
    }

    .step-mark {
        width: 18px;
        height: 18px;
    }

    .wait-head {
        gap: 16px;
    }

    .ring {
        width: 80px;
        height: 80px;
    }

    .ring-time {
        font-size: 16px;
    }

    .code-char {
        height: 66px;
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ring-scan,
    .emblem,
    .em-trace,
    .art-glow,
    .step.is-current .step-bar::after {
        animation: none;
    }
}
