:root {
    color-scheme: dark;
    --color-bg: #090d14;
    --color-bg-elevated: #0d121c;
    --color-surface: #121823;
    --color-surface-2: #171e2b;
    --color-surface-hover: #1d2534;
    --color-border: #273041;
    --color-border-strong: #384256;
    --color-primary: #7c3aed;
    --color-primary-hover: #8b5cf6;
    --color-primary-active: #6d28d9;
    --color-primary-soft: rgba(124, 58, 237, 0.14);
    --color-primary-ring: rgba(139, 92, 246, 0.35);
    --color-text: #fff;
    --color-text-secondary: #c3bfcc;
    --color-text-muted: #9298a9;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-info: #a78bfa;
    --focus: 0 0 0 4px var(--color-primary-ring);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --z-focus: 10;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--color-bg); }
body { margin: 0; min-height: 100vh; color: var(--color-text); background: var(--color-bg); font: 400 15px/1.55 Inter, "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--color-info); text-underline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.skip-link { position: fixed; z-index: var(--z-focus); top: 12px; left: 12px; padding: 10px 14px; color: #fff; background: var(--color-primary); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.auth-page { background: radial-gradient(circle at 78% 12%, rgba(124, 58, 237, .09), transparent 32%), var(--color-bg); }
.auth-shell { display: flex; min-height: 100vh; }

.brand-panel { position: relative; display: flex; flex: 1.14; min-height: 100vh; overflow: hidden; isolation: isolate; padding: 42px 48px 30px; background: linear-gradient(145deg, #080d16 0%, #0a1120 56%, #100c20 100%); }
.brand-panel { background-color: #070a12; background-image: linear-gradient(90deg, rgba(5, 8, 14, .94) 0%, rgba(5, 8, 14, .75) 38%, rgba(5, 8, 14, .15) 72%), linear-gradient(0deg, rgba(4, 7, 12, .96) 0%, rgba(5, 8, 14, .35) 47%, rgba(5, 8, 14, .22) 100%), url("../images/bgt1-solomon199.jpg"); background-position: center, center, 54% center; background-size: cover; }
.brand-panel::before { position: absolute; inset: 0; z-index: 0; content: ""; background: radial-gradient(circle at 72% 24%, rgba(164, 92, 246, .14), transparent 36%); pointer-events: none; }
.brand-panel__content { position: relative; z-index: 2; display: flex; flex-direction: column; width: 100%; }
.wordmark { display: inline-flex; align-items: baseline; width: max-content; color: var(--color-text); font-size: 21px; font-weight: 780; letter-spacing: -.025em; text-decoration: none; }
.wordmark span { color: #9b5cff; }
.brand-story { max-width: 530px; margin-top: auto; margin-bottom: 48px; }
.brand-story__label { margin: 0 0 12px; color: #c4a8ff; font-size: 14px; font-weight: 650; }
.brand-story h1 { max-width: 18ch; margin: 0 0 18px; font-size: 38px; line-height: 1.22; letter-spacing: -.025em; text-wrap: balance; }
.brand-story p:not(.brand-story__label) { max-width: 62ch; margin: 0; color: var(--color-text-secondary); font-size: 15px; line-height: 1.72; text-wrap: pretty; }
.trust-list { display: flex; gap: 16px; width: min(100%, 610px); margin-bottom: 42px; }
.trust-item { display: flex; flex: 1; gap: 10px; align-items: flex-start; min-width: 0; }
.trust-item > svg { flex: 0 0 auto; width: 22px; height: 22px; color: #b08aee; }
.trust-item span { display: flex; min-width: 0; flex-direction: column; }
.trust-item strong { font-size: 13px; font-weight: 650; }
.trust-item small { margin-top: 2px; color: var(--color-text-muted); font-size: 12px; line-height: 1.35; }
.brand-panel__secure { position: relative; z-index: 2; display: flex; gap: 8px; align-items: center; margin: 0; color: var(--color-text-muted); font-size: 12px; }
.brand-panel__secure svg { width: 16px; }

.auth-workspace { display: flex; flex: .86; min-width: 480px; min-height: 100vh; flex-direction: column; justify-content: center; padding: 30px clamp(32px, 5vw, 88px); }
.mobile-visual, .mobile-brand { display: none; }
.auth-card { width: min(100%, 480px); margin: auto; }
.auth-card--register { width: min(100%, 620px); padding-block: 32px; }
.auth-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 30px; }
.auth-heading__icon { display: grid; flex: 0 0 auto; width: 48px; height: 48px; place-items: center; color: #b895f8; border: 1px solid #49346d; border-radius: 12px; background: #171329; }
.auth-heading__icon svg { width: 25px; height: 25px; }
.auth-heading h2, .register-heading h2 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.auth-heading p, .register-heading p { margin: 5px 0 0; color: var(--color-text-secondary); }
.register-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.step-count { flex: 0 0 auto; padding: 6px 10px; color: #c8adff; font-size: 12px; font-weight: 650; background: var(--color-primary-soft); border-radius: 999px; }

.stepper { display: flex; padding: 0; margin: 0 0 30px; list-style: none; }
.stepper__item { position: relative; display: flex; flex: 1; flex-direction: column; gap: 7px; align-items: center; color: var(--color-text-muted); font-size: 12px; text-align: center; }
.stepper__item:not(:last-child)::after { position: absolute; top: 15px; left: calc(50% + 22px); width: calc(100% - 44px); height: 1px; content: ""; background: var(--color-border-strong); }
.stepper__dot { position: relative; z-index: 1; display: grid; width: 32px; height: 32px; place-items: center; color: var(--color-text-secondary); font-weight: 700; border: 1px solid var(--color-border-strong); border-radius: 50%; background: var(--color-bg-elevated); }
.stepper__dot svg { width: 17px; }
.stepper__item--complete { color: var(--color-text-secondary); }
.stepper__item--complete .stepper__dot { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }
.stepper__item--complete:not(:last-child)::after { background: var(--color-primary); }
.stepper__item--current { color: #fff; font-weight: 650; }
.stepper__item--current .stepper__dot { color: #fff; border-color: #a06af2; background: var(--color-primary); box-shadow: var(--focus); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; margin: 0 0 20px; font-size: 14px; border-radius: 10px; }
.alert svg { flex: 0 0 auto; width: 18px; margin-top: 1px; }
.alert--error { color: #ffc7c7; border: 1px solid rgba(239, 68, 68, .48); background: rgba(127, 29, 29, .22); }
.alert--info { color: #ddd0ff; border: 1px solid rgba(167, 139, 250, .38); background: rgba(76, 29, 149, .18); }
.form-intro { margin-bottom: 22px; }
.form-intro h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.35; }
.form-intro p { margin: 0; color: var(--color-text-secondary); }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.password-upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-upgrade-hint { display: flex; gap: 7px; align-items: flex-start; margin: -5px 0 0; }
.password-upgrade-hint svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: #b895f8; }
.password-upgrade-cancel { display: flex; justify-content: center; margin-top: 10px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label, .otp-fieldset legend { color: #ebe9ef; font-size: 13px; font-weight: 620; transition: color 180ms var(--ease-out); }
.field__label-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.field__label-row a { font-size: 13px; }
.field__hint { color: var(--color-text-muted); font-size: 12px; }
input, select { width: 100%; min-height: 48px; padding: 11px 14px; color: var(--color-text); caret-color: #b58af8; border: 1px solid var(--color-border); border-radius: 12px; outline: none; background: #0b1019; transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out); }
input::placeholder { color: #8f96a8; opacity: 1; }
input:hover, select:hover { border-color: var(--color-border-strong); background: #0d131d; }
input:focus-visible, select:focus-visible { border-color: var(--color-primary-hover); box-shadow: var(--focus); }
input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
.field:focus-within > label, .field:focus-within .field__label-row > label { color: #decaff; }
.input-wrap { position: relative; isolation: isolate; }
.input-wrap::before { position: absolute; top: 50%; left: 7px; z-index: 2; width: 33px; height: 33px; content: ""; border: 1px solid rgba(181, 138, 248, .28); border-radius: 8px; background: rgba(124, 58, 237, .16); opacity: 0; transform: translateY(-50%) scale(.9); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), background-color 180ms var(--ease-out); pointer-events: none; }
.input-wrap:focus-within::before { opacity: 1; transform: translateY(-50%) scale(1); }
.input-wrap > svg { position: absolute; top: 50%; left: 14px; z-index: 3; width: 19px; color: var(--color-text-muted); transform: translateY(-50%); transition: color 180ms var(--ease-out), filter 180ms var(--ease-out); pointer-events: none; }
.input-wrap:focus-within > svg { color: #e5d7ff; filter: drop-shadow(0 0 5px rgba(181, 138, 248, .35)); }
.input-wrap > input { position: relative; z-index: 1; padding-inline: 43px; }
.input-wrap > input[type="password"], .input-wrap > input[type="text"] { padding-right: 48px; }
.input-action { position: absolute; top: 2px; right: 2px; z-index: 4; display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--color-text-muted); border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.input-action:hover { color: #fff; background: var(--color-surface); }
.input-action:focus-visible { outline: none; box-shadow: var(--focus); }
.input-action .eye-closed { display: none; }
.input-action.is-visible .eye-open { display: none; }
.input-action.is-visible .eye-closed { display: block; }
.phone-control { display: flex; }
.country-code { display: flex; flex: 0 0 auto; gap: 7px; min-height: 48px; padding: 11px 13px; align-items: center; color: #dedbe4; border: 1px solid var(--color-border); border-right: 0; border-radius: 12px 0 0 12px; background: var(--color-surface); }
.phone-control input { border-radius: 0 12px 12px 0; }
.select-wrap { position: relative; }
.select-wrap select { padding-right: 42px; appearance: none; }
.select-wrap svg { position: absolute; top: 50%; right: 14px; color: var(--color-text-muted); transform: translateY(-50%); pointer-events: none; }
.select-wrap--bank select { padding-left: 50px; }
.bank-select-logo { position: absolute; z-index: 1; top: 50%; left: 12px; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: var(--color-surface); transform: translateY(-50%); pointer-events: none; }
.bank-select-logo[hidden] { display: none; }
.bank-select-logo img { display: block; width: 22px; height: 22px; object-fit: contain; }

.check-row { display: flex; gap: 10px; min-height: 44px; align-items: center; color: var(--color-text-secondary); font-size: 13px; cursor: pointer; }
.check-row input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }
.check-box { display: grid; flex: 0 0 auto; width: 18px; height: 18px; place-items: center; border: 1px solid #596276; border-radius: 5px; background: #0a0f17; }
.check-row input:checked + .check-box { border-color: var(--color-primary); background: var(--color-primary); }
.check-row input:checked + .check-box::after { width: 8px; height: 4px; content: ""; border-bottom: 2px solid #fff; border-left: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.check-row input:focus-visible + .check-box { box-shadow: var(--focus); }

.button { display: inline-flex; min-height: 48px; padding: 11px 18px; justify-content: center; gap: 8px; align-items: center; color: #fff; font-weight: 700; text-align: center; text-decoration: none; border-radius: 12px; cursor: pointer; transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out), background-color 180ms var(--ease-out), transform 180ms var(--ease-out); }
.button svg { width: 18px; transition: transform 180ms var(--ease-out); }
.button:hover svg { transform: translateX(2px); }
.button:active { transform: translateY(1px); }
.button:focus-visible, .text-link:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
.button:disabled { cursor: wait; opacity: .65; }
.button--primary { border: 1px solid var(--color-primary); background: var(--color-primary); }
.button--primary:hover { border-color: var(--color-primary-hover); background: var(--color-primary-hover); }
.button--primary:active { border-color: var(--color-primary-active); background: var(--color-primary-active); }
.button--secondary { color: #e7e4eb; border: 1px solid var(--color-border-strong); background: transparent; }
.button--secondary:hover { border-color: #556077; background: var(--color-surface); }
.form-actions { display: grid; grid-template-columns: minmax(120px, .72fr) minmax(160px, 1.28fr); gap: 12px; margin-top: 4px; }
.auth-switch { margin: 24px 0 0; color: var(--color-text-secondary); text-align: center; }
.auth-switch a { font-weight: 650; }
.auth-contact-trigger { display: grid; width: 100%; min-height: 66px; padding: 10px 2px; margin-top: 20px; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 11px; align-items: center; color: var(--color-text); text-align: left; border: 0; border-top: 1px solid rgba(56, 66, 86, .72); border-bottom: 1px solid rgba(56, 66, 86, .72); background: transparent; cursor: pointer; }
.auth-contact-trigger:hover { background: rgba(23, 30, 43, .5); }
.auth-contact-trigger:focus-visible { outline: none; border-radius: 8px; box-shadow: var(--focus); }
.auth-contact__mark, .auth-channel-mark { display: grid; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 9px; font-weight: 850; }
.auth-contact__mark { width: 40px; height: 40px; color: #e6d9ff; background: #372052; }
.auth-contact__mark svg, .auth-channel-mark svg { width: 19px; height: 19px; }
.auth-contact__summary-copy, .auth-contact__web > span:nth-child(2), .auth-contact__channel > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.auth-contact__summary-copy strong { color: var(--color-text); font-size: 14px; }
.auth-contact__summary-copy small, .auth-contact__web small, .auth-contact__channel small { margin-top: 2px; color: var(--color-text-muted); font-size: 11px; line-height: 1.4; }
.auth-contact__chevron { color: var(--color-text-muted); transition: color 180ms var(--ease-out), transform 180ms var(--ease-out); }
.auth-contact-trigger:hover .auth-contact__chevron { color: #d6c0ff; transform: translateX(2px); }
.auth-contact-dialog { width: min(calc(100% - 32px), 470px); max-height: min(740px, calc(100dvh - 32px)); padding: 0; overflow: auto; overscroll-behavior: contain; color: var(--color-text); border: 1px solid var(--color-border-strong); border-radius: 14px; background: var(--color-bg-elevated); box-shadow: 0 8px 8px rgba(0, 0, 0, .32); }
.auth-contact-dialog::backdrop { background: rgba(2, 5, 10, .82); }
.auth-contact-dialog[open] { animation: auth-contact-enter 180ms var(--ease-out); }
.auth-contact-dialog__handle { display: none; }
.auth-contact-dialog__head { display: flex; padding: 22px 22px 15px; justify-content: space-between; gap: 16px; align-items: flex-start; }
.auth-contact-dialog__head h2 { margin: 0; font-size: 21px; line-height: 1.3; letter-spacing: -.02em; }
.auth-contact-dialog__head p { max-width: 38ch; margin: 5px 0 0; color: var(--color-text-secondary); font-size: 12px; text-wrap: pretty; }
.auth-contact-dialog__close { display: grid; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; place-items: center; color: var(--color-text-secondary); border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.auth-contact-dialog__close:hover { color: #fff; background: var(--color-surface); }
.auth-contact-dialog__close:focus-visible { outline: none; box-shadow: var(--focus); }
.auth-contact__panel { padding: 0 16px 8px; }
.auth-contact__web, .auth-contact__channel { display: grid; align-items: center; color: var(--color-text); text-decoration: none; }
.auth-contact__web { min-height: 66px; padding: 10px 12px; grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 11px; border-radius: 10px; background: var(--color-primary-soft); }
.auth-contact__web:hover { background: rgba(124, 58, 237, .22); }
.auth-contact__web strong, .auth-contact__channel strong { overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.auth-contact__web > svg:last-child, .auth-contact__channel > svg:last-child { width: 17px; height: 17px; color: var(--color-text-muted); }
.auth-contact__label { padding: 14px 4px 5px; margin: 0; color: var(--color-text-muted); font-size: 11px; }
.auth-contact__channels { display: flex; flex-direction: column; }
.auth-contact__channel { min-height: 56px; padding: 8px 4px; grid-template-columns: 38px minmax(0, 1fr) 18px; gap: 11px; border-radius: 8px; }
.auth-contact__channel + .auth-contact__channel { border-top: 1px solid rgba(56, 66, 86, .52); border-radius: 0; }
.auth-contact__channel:hover { background: var(--color-surface); }
.auth-contact__channel.is-unavailable { color: var(--color-text-secondary); cursor: not-allowed; opacity: .68; }
.auth-contact__channel.is-unavailable:hover { background: transparent; }
.auth-channel-mark { width: 38px; height: 38px; font-size: 13px; }
.auth-channel-mark--web { color: #e6d9ff; background: #372052; }
.auth-channel-mark--line, .auth-channel-mark--telegram { background: transparent; }
.auth-channel-mark img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.auth-contact-dialog a:focus-visible { outline: none; box-shadow: var(--focus); }
.auth-contact-dialog__note { display: flex; padding: 13px 6px 8px; margin: 0; gap: 8px; align-items: flex-start; color: var(--color-text-muted); font-size: 10px; line-height: 1.5; }
.auth-contact-dialog__note svg { flex: 0 0 auto; width: 16px; color: #b895f8; }
.auth-contact-dialog + .privacy-note { padding-top: 0; border-top: 0; }
@keyframes auth-contact-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; padding-top: 20px; margin-top: 22px; color: var(--color-text-muted); font-size: 12px; border-top: 1px solid rgba(56, 66, 86, .55); }
.privacy-note svg { flex: 0 0 auto; width: 17px; height: 17px; }
.auth-footer { display: flex; width: min(100%, 620px); padding-top: 24px; margin: 0 auto; justify-content: space-between; color: var(--color-text-muted); font-size: 12px; }
.auth-footer a { color: var(--color-text-secondary); }

.otp-fieldset { padding: 0; margin: 0; border: 0; }
.otp-fieldset legend { margin-bottom: 9px; }
.otp-control { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp-control input { min-width: 0; height: 58px; padding: 4px; font-size: 24px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.otp-meta { display: flex; min-height: 28px; justify-content: center; color: var(--color-text-muted); font-size: 13px; }
.otp-meta strong { color: #c6a9fa; font-variant-numeric: tabular-nums; }
.demo-note { padding: 9px 12px; margin: -8px 0 0; color: #e2d5ff; font-size: 13px; border: 1px dashed #60419c; border-radius: 9px; background: rgba(124, 58, 237, .1); }
.below-actions { display: flex; justify-content: center; gap: 20px; margin-top: 18px; }
.below-actions form { margin: 0; }
.text-link { min-height: 44px; padding: 8px 4px; color: var(--color-info); font: inherit; font-weight: 650; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
.text-link:disabled { color: var(--color-text-muted); cursor: not-allowed; }
.text-link--muted { color: var(--color-text-secondary); }
.strength { display: flex; gap: 10px; align-items: center; color: var(--color-text-muted); font-size: 12px; }
.strength__bar { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: var(--color-border); }
.strength__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--color-danger); transition: width 180ms var(--ease-out), background-color 180ms var(--ease-out); }
.strength[data-level="1"] .strength__bar i { width: 33%; }
.strength[data-level="2"] .strength__bar i { width: 66%; background: #f59e0b; }
.strength[data-level="3"] .strength__bar i { width: 100%; background: var(--color-success); }
.password-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; padding: 0; margin: -4px 0 0; color: var(--color-text-muted); font-size: 12px; list-style: none; }
.password-rules li::before { display: inline-block; width: 16px; content: "○"; color: #71798d; }
.password-rules li.is-valid { color: #9ee5b4; }
.password-rules li.is-valid::before { content: "✓"; color: var(--color-success); }

.success-state { display: flex; min-height: 520px; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.success-state__icon { position: relative; display: grid; width: 92px; height: 92px; margin-bottom: 28px; place-items: center; color: #a9f5be; border: 2px solid var(--color-success); border-radius: 50%; background: rgba(34, 197, 94, .09); box-shadow: 0 0 40px rgba(34, 197, 94, .16); }
.success-state__icon svg { width: 44px; height: 44px; stroke-width: 2.2; }
.success-state h2 { margin: 0 0 10px; font-size: 30px; }
.success-state p { max-width: 44ch; margin: 0 0 28px; color: var(--color-text-secondary); }
.success-state .button { width: min(100%, 340px); }
.success-state__login { width: min(100%, 340px); }
.success-state__login .button { width: 100%; }
.success-state > .text-link { margin-top: 12px; }

.placeholder-page { display: flex; min-height: 100vh; padding: 40px; flex-direction: column; background: radial-gradient(circle at 70% 20%, rgba(124, 58, 237, .2), transparent 30%), var(--color-bg); }
.placeholder-page section { width: min(100%, 640px); margin: auto; }
.placeholder-page h1 { margin: 0 0 12px; font-size: 38px; letter-spacing: -.025em; }
.placeholder-page section > p:not(.brand-story__label) { margin: 0 0 24px; color: var(--color-text-secondary); }
.info-page { display: flex; min-height: 100svh; padding: 32px max(20px, env(safe-area-inset-left)); flex-direction: column; background: radial-gradient(circle at 70% 10%, rgba(124, 58, 237, .16), transparent 34%), var(--color-bg); }
.info-page article { width: min(100%, 620px); margin: auto; }
.info-page article > svg { width: 38px; height: 38px; margin-bottom: 18px; color: #b895f8; }
.info-page h1 { margin: 0 0 14px; font-size: 30px; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; }
.info-page p { max-width: 65ch; margin: 0 0 26px; color: var(--color-text-secondary); text-wrap: pretty; }

@media (max-width: 1040px) {
    .brand-panel { flex: .8; padding: 34px 30px 26px; }
    .auth-workspace { flex: 1; min-width: 450px; padding-inline: 38px; }
    .brand-story h1 { font-size: 31px; }
    .trust-list { flex-direction: column; gap: 13px; }
    .trust-item small { display: none; }
}

@media (max-width: 920px) {
    .auth-page { background: #070b12; }
    .auth-shell { display: block; }
    .brand-panel { display: none; }
    .auth-workspace {
        display: grid;
        width: 100%;
        min-width: 0;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        justify-items: stretch;
        align-content: start;
        padding-top: 0;
        padding-right: max(5px, env(safe-area-inset-right));
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        padding-left: max(5px, env(safe-area-inset-left));
        background: #070b12;
    }
    .mobile-visual { position: relative; display: block; width: 100%; height: clamp(220px, 60vw, 300px); margin: 0; overflow: hidden; isolation: isolate; background-color: #0b0717; background-image: linear-gradient(180deg, rgba(3, 5, 10, .7) 0%, rgba(5, 8, 14, .02) 38%, rgba(7, 11, 18, .96) 100%), url("../images/bgt1-solomon199.jpg"); background-position: center, 50% 34%; background-repeat: no-repeat; background-size: cover, 122% auto; }
    .mobile-visual::before { position: absolute; inset: 0; z-index: 0; content: ""; background: linear-gradient(90deg, rgba(5, 7, 13, .12), transparent 28% 72%, rgba(5, 7, 13, .12)); pointer-events: none; }
    .mobile-brand { position: relative; z-index: 3; display: flex; min-height: 68px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; justify-content: center; align-items: flex-start; background: linear-gradient(180deg, rgba(3, 5, 10, .72) 0%, rgba(3, 5, 10, .28) 68%, transparent 100%); }
    .mobile-brand .wordmark { position: relative; z-index: 1; padding: 9px 12px 10px; color: #fff; font-size: clamp(21px, 5.8vw, 25px); font-weight: 850; letter-spacing: -.03em; line-height: 1; border: 0; border-radius: 9px; background: #070b12; box-shadow: 0 4px 8px rgba(0, 0, 0, .32); }
    .mobile-brand .wordmark span { color: #d09aff; }
    .auth-card--register { width: min(100%, 540px); margin-inline: auto; }
    .auth-card--login { position: relative; z-index: 2; width: 100%; max-width: none; padding: clamp(22px, 5vw, 28px); margin-top: clamp(-56px, -10vw, -40px); color: var(--color-text); border: 1px solid var(--color-border); border-radius: 14px; background: #0c121b; }
    .register-page .auth-workspace { grid-template-rows: auto auto auto; }
    .register-page .mobile-brand { justify-content: center; }
    .register-page .auth-card--register { width: min(calc(100% - 20px), 540px); padding-block: 12px; margin-top: 0; align-self: start; }
    .auth-heading { gap: 12px; margin-bottom: clamp(24px, 3vh, 28px); }
    .login-page .auth-heading__icon { display: grid; width: 44px; height: 44px; }
    .login-page .auth-heading__icon svg { width: 22px; height: 22px; }
    .auth-heading h2, .register-heading h2 { font-size: 24px; }
    .auth-form { gap: clamp(17px, 2.2vh, 20px); }
    .auth-card--login input { background: #0a1018; }
    .auth-card--login .button--primary { min-height: 52px; background: var(--color-primary); }
    .auth-switch { margin-top: 18px; }
    .privacy-note { padding-top: 16px; margin-top: 20px; }
    .auth-footer { width: 100%; padding: 22px clamp(10px, 3vw, 22px) max(18px, env(safe-area-inset-bottom)); margin: 0; justify-content: center; gap: 18px; align-self: start; flex-wrap: wrap; }
    .success-state { min-height: min(62dvh, 560px); }

    .login-page .auth-workspace > .mobile-visual,
    .login-page .auth-workspace > .auth-card--login,
    .login-page .auth-workspace > .auth-footer {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        justify-self: stretch;
    }
}

@media (min-width: 640px) and (max-width: 920px) {
    .auth-card--login { padding-inline: clamp(48px, 10vw, 96px); }
    .mobile-visual { background-size: cover, 112% auto; }
}

@media (max-width: 480px) {
    .auth-workspace {
        padding-right: max(5px, env(safe-area-inset-right));
        padding-left: max(5px, env(safe-area-inset-left));
    }
    .mobile-visual { background-size: cover, 132% auto; }
    .auth-contact-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(84dvh, 740px); margin: 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 14px 14px 0 0; }
    .auth-contact-dialog[open] { animation-name: auth-contact-sheet-enter; }
    .auth-contact-dialog__handle { display: block; width: 38px; height: 4px; margin: 9px auto 0; border-radius: 999px; background: var(--color-border-strong); }
    .auth-contact-dialog__head { padding: 12px max(16px, env(safe-area-inset-right)) 13px max(16px, env(safe-area-inset-left)); }
    .auth-contact-dialog__head h2 { font-size: 19px; }
    .auth-contact__panel { padding-right: max(10px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); padding-left: max(10px, env(safe-area-inset-left)); }
    .register-heading { margin-bottom: 22px; }
    .register-heading p { max-width: 29ch; font-size: 13px; }
    .step-count { display: none; }
    .stepper { margin-bottom: 25px; }
    .stepper__label { font-size: 11px; }
    .stepper__item:not(:last-child)::after { left: calc(50% + 19px); width: calc(100% - 38px); }
    .stepper__dot { width: 30px; height: 30px; }
    .field-grid { grid-template-columns: 1fr; }
    .password-upgrade-grid { grid-template-columns: 1fr; }
    .form-actions { position: sticky; z-index: 2; bottom: 0; padding: 12px 0 max(8px, env(safe-area-inset-bottom)); margin-inline: -2px; background: linear-gradient(transparent 0, var(--color-bg) 18px); }
    .otp-control { gap: 6px; }
    .otp-control input { height: 53px; font-size: 21px; border-radius: 10px; }
    .password-rules { grid-template-columns: 1fr; }
    .auth-footer { gap: 6px 16px; align-items: center; }
}

@keyframes auth-contact-sheet-enter { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 359px) {
    .auth-workspace {
        padding-top: 0;
        padding-right: max(5px, env(safe-area-inset-right));
        padding-left: max(5px, env(safe-area-inset-left));
    }
    .mobile-brand .wordmark { font-size: 18px; }
    .auth-heading h2, .register-heading h2 { font-size: 23px; }
    .auth-heading p { font-size: 13px; }
    .auth-heading__icon { width: 40px; height: 40px; }
    .field__label-row { gap: 10px; }
    .field__label-row a { font-size: 12px; }
    .check-row { font-size: 12px; }
    .form-actions { grid-template-columns: minmax(92px, .7fr) minmax(146px, 1.3fr); gap: 8px; }
    .otp-control { gap: 4px; }
    .otp-control input { height: 49px; font-size: 19px; }
}

@media (max-width: 920px) and (max-height: 700px) {
    .auth-workspace { grid-template-rows: auto auto auto; }
    .login-page .mobile-visual { height: 172px; }
    .login-page .mobile-visual { background-position: center, 50% 31%; }
    .login-page .auth-card--login { margin-top: -44px; }
    .register-page .auth-card--register { padding-block: 6px 10px; align-self: start; }
    .auth-heading { margin-bottom: 18px; }
    .auth-form { gap: 16px; }
    .privacy-note { padding-top: 14px; margin-top: 16px; }
    .auth-footer { padding-top: 20px; }
}

@media (max-width: 920px) and (orientation: landscape) and (max-height: 560px) {
    .auth-workspace {
        min-height: 100dvh;
        grid-template-rows: auto auto auto;
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    .login-page .mobile-visual { height: 150px; }
    .login-page .mobile-visual { background-position: center, 50% 28%; }
    .login-page .auth-card--login { margin-top: -36px; }
    .register-page .auth-card--register { padding-block: 4px; align-self: start; }
    .auth-footer { padding-top: 18px; }
}

@media (pointer: coarse) {
    .button, .text-link { min-height: 48px; }
    .check-row { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
