:root { color-scheme: dark; --registration-bg:#0e0e0e; --registration-accent:#3eff42; }
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; background:var(--registration-bg); }
/* A double tap never zooms; app-viewport.js stops a step that fits the screen from moving. */
html { touch-action:manipulation; }
/* As in an app, a long press selects nothing and opens no copy menu; only what you type can be selected. */
html { -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }
input,textarea,select,[contenteditable]:not([contenteditable="false"]) { -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; }
body.registration { color:#f7f7f7; font-family:Outfit,Arial,sans-serif; font-size:14px; }
button,input,a { font:inherit; -webkit-tap-highlight-color:transparent; }
button,a { cursor:pointer; }
button { color:inherit; }
a { color:inherit; text-decoration:none; }
button,input { min-width:0; }
button,a,input { transition:background-color .18s,border-color .18s,opacity .18s; }
:focus-visible { outline:2px solid #fff; outline-offset:5px; }
button:disabled { cursor:default; }
/* Vertical offsets follow the 393x852 Figma frames, measured from the bottom of the status bar.
   --extra is the screen height beyond that frame, shared out so taller phones keep its proportions. */
.registration-screen { --gutter:30px; --extra:calc(100svh - 764px); width:100%; max-width:430px; min-height:100svh; margin:0 auto; position:relative; padding:0 var(--gutter); display:flex; flex-direction:column; }
.registration-nav { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; height:44px; margin-top:calc(2px + var(--app-safe-area-top, env(safe-area-inset-top,0px))); font-size:14px; flex-shrink:0; }
.registration-nav>span { color:#6e6e6e; }
.back-link,.skip-link { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; }
.back-link { justify-self:start; margin-left:-8px; }
.skip-link { justify-self:end; margin-right:3px; }
.back-link svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; stroke-linejoin:round; }
.registration-heading { text-align:center; margin:clamp(24px,calc(59px + var(--extra) * .2),90px) 0 0; }
.registration-heading h1 { font-size:32px; font-weight:400; line-height:38.4px; word-spacing:1.4px; margin:0; }
.registration-heading p { font-size:14px; line-height:1.4; color:#777; margin:9px auto 0; max-width:290px; }
.registration-form { flex:1; display:flex; flex-direction:column; }
.registration-footer { margin-top:auto; display:flex; justify-content:center; padding:40px 0 max(clamp(24px,calc(52px + var(--extra) * .2),90px),var(--app-safe-area-bottom, env(safe-area-inset-bottom,0px))); }
.round-next,.pill-next { border:0; background:var(--registration-accent); color:#0e0e0e; display:flex; align-items:center; justify-content:center; min-height:53px; }
.round-next { width:53px; height:53px; border-radius:21px; padding:0; }
.round-next svg,.pill-next svg { width:24px; height:24px; fill:none; stroke:#126013; stroke-width:3.1; stroke-linecap:round; stroke-linejoin:round; }
/* The Figma's disabled button is the live one at 40% opacity. */
.round-next:disabled,.pill-next:disabled { opacity:.4; }
.round-next:hover:not(:disabled),.pill-next:hover:not(:disabled) { background:#6aff67; }
.pill-next { min-width:260px; border-radius:28px; gap:20px; padding:0 24px; font-size:14px; }
.pill-next svg { margin-left:auto; }
.language-screen .registration-heading { margin-top:110px; }
.language-screen .registration-heading p { font:30px/1.3 Arial,sans-serif; margin-top:30px; color:#f7f7f7; }
.choice-fan { position:relative; width:100%; height:300px; margin:50px auto 0; }
.language-card,.gender-card { position:absolute; border:2px solid transparent; box-shadow:none; display:flex; flex-direction:column; align-items:center; justify-content:center; border-radius:24px; width:166px; height:222px; padding:16px; }
.language-card[aria-pressed=true],.gender-card[aria-pressed=true] { border-color:#fff; }
.language-screen .choice-fan { margin-top:65px; }
.language-card.arabic { --rest-angle:-5deg; left:12px; top:60px; background:#226f21; color:#fff; z-index:2; }
.language-card.english { --rest-angle:4deg; right:12px; top:5px; background:#efde1a; color:#080808; }
.language-letter { font:bold 65px/1.1 Arial,sans-serif; margin-bottom:23px; }
.arabic .language-letter { font-size:84px; margin-bottom:12px; }
.language-label,.language-region { font-size:14px; line-height:1.2; font-weight:400; }
.language-region { font-size:12px; }
.gender-screen .choice-fan { margin-top:74px; }
.gender-card { height:226px; justify-content:flex-end; padding-bottom:24px; }
.gender-card.male { --rest-angle:-11deg; background:#ed38ac; left:12px; top:72px; z-index:2; }
.gender-card.female { --rest-angle:5deg; background:#007aca; right:10px; top:0; }
.gender-art { position:absolute; inset:10px 2px 48px; display:flex; justify-content:center; align-items:center; }
.gender-art svg { width:100%; height:100%; }
.gender-card span { font-size:14px; }
.male .gender-art { color:#ed38ac; }
.female .gender-art { color:#007aca; }
.gender-art img { width:72%; height:auto; }
.male .gender-art img { transform:rotate(11deg); }
.female .gender-art img { width:94%; transform:rotate(-5deg); }
.gender-card.male { background:#ef40a9; }
.gender-card.female { background:#0673ce; }
/* Lift the chosen card while preserving the two-card fan and its hit targets. */
.language-card,.gender-card {
    --card-lift:0px;
    --card-scale:1;
    --card-angle:var(--rest-angle);
    transform:translateY(var(--card-lift)) rotate(var(--card-angle)) scale(var(--card-scale));
    transition:transform 260ms cubic-bezier(.23,1,.32,1),border-color 180ms ease;
    touch-action:manipulation;
}
.language-card[aria-pressed=true],.gender-card[aria-pressed=true] {
    --card-lift:-18px;
    --card-angle:calc(var(--rest-angle) * .45);
    --card-scale:1.025;
    z-index:3;
}
@media(hover:hover) and (pointer:fine) {
    .language-card:not([aria-pressed=true]):hover,.gender-card:not([aria-pressed=true]):hover {
        --card-lift:-6px;
        border-color:#ffffff80;
    }
}
.language-card:active,.gender-card:active {
    --card-scale:.97;
    transition-duration:120ms;
}
.language-screen .round-next,.gender-screen .round-next {
    transition:transform 220ms cubic-bezier(.23,1,.32,1),background-color 180ms ease,color 180ms ease;
}
.language-screen .round-next:disabled,.gender-screen .round-next:disabled { transform:scale(.94); }
.language-screen .round-next:active:not(:disabled),.gender-screen .round-next:active:not(:disabled) { transform:scale(.94); }
[data-card-input=keyboard] .language-card,[data-card-input=keyboard] .gender-card,[data-card-input=keyboard] .round-next { transition:none; }
.name-field { border:0; outline:none; background:transparent; text-align:center; color:#fff; width:100%; font:600 34px/1.3 Georgia,serif; padding:16px 0; margin-top:150px; border-radius:0; }
.name-field::placeholder { color:#666; }
.name-field:focus-visible { outline-offset:8px; }
.name-screen .pill-next:disabled { width:53px; min-width:53px; padding:0; border-radius:21px; }
.name-screen .pill-next:disabled span { display:none; }
.name-screen .pill-next:disabled svg { margin:0; }
.avatar-preview { width:110px; height:110px; background:#202020; border:1px solid #444; border-radius:26px; margin:38px auto 20px; display:grid; place-items:center; font-size:48px; }
.avatar-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; max-width:300px; width:100%; margin:0 auto; }
.avatar-option { aspect-ratio:1; padding:10px; background:#242424; border:1px solid transparent; border-radius:18px; font-size:23px; }
.avatar-option[aria-pressed=true] { border-color:#fff; background:#414141; }
.avatar-option { padding:10px; overflow:hidden; background:#1f1f1f; box-shadow:inset 0 1px 3px #ffffff22; display:grid; place-items:center; }
.avatar-option img { display:block; width:100%; }
.avatar-preview { background:#1f1f1f; }
.avatar-preview img { width:72%; height:72%; border-radius:0; object-fit:contain; }
/* Usage cards: a snapping row that registration.js bends into the Figma's fan. Cards beside the centre
   sit 111px lower, tilt 10.5deg, shrink to 90.5% and fade to 41%; the bottom padding keeps them unclipped
   and the negative margin lets the footer sit over that padding. */
.usage-options { position:relative; display:flex; gap:17.6px; overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scrollbar-width:none; margin:clamp(12px,calc(49.7px + var(--extra) * .15),80px) calc(-1 * var(--gutter)) -110px; padding:12px calc((100% + 2 * var(--gutter) - 208px) / 2) 110px; }
.usage-options::-webkit-scrollbar { display:none; }
.usage-option { flex:0 0 208px; height:287px; position:relative; scroll-snap-align:center; border:0; border-radius:24px; background:#242424; padding:0; box-shadow:0 3px 6px #00000040; will-change:transform,opacity; transition:box-shadow .2s ease; }
.usage-option.is-side,.usage-option[aria-pressed=true] { box-shadow:inset 0 3px 4px -1px #ffffff36,0 3px 5px -1px #ffffff20; }
.usage-option::after { content:''; position:absolute; top:20.5px; right:18.75px; width:18px; height:19px; box-sizing:border-box; border:1.5px solid #acacac; border-radius:1px; transition:opacity .2s ease; }
.usage-option.is-side:not([aria-pressed=true])::after { opacity:0; }
.usage-option[aria-pressed=true]::after { background:#acacac url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 19'%3E%3Cpath d='M4.6 9.2l3 3.6 6.2-6.9' fill='none' stroke='%23242424' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px 19px no-repeat; }
.usage-art { position:absolute; top:44px; left:16px; width:176px; height:176px; }
.usage-option span { position:absolute; left:0; right:0; top:240px; font-size:16px; line-height:20px; color:#a7a7a7; }
.usage-screen .registration-footer { position:relative; padding-top:12px; }
@media(max-height:600px) { .usage-options { margin-top:6px; margin-bottom:-94px; padding-bottom:94px; } }
.age-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:24px; margin:40px 6px 0; }
.age-option { height:145px; background:#222; border:1px solid transparent; border-radius:24px; font-size:16px; color:#bbb; }
.age-option[aria-pressed=true] { background:#444; border-color:#aaa; color:#fff; }
.age-option,.avatar-preview { box-shadow:inset 0 2px 4px #ffffff22; }
.entry-heading { margin-top:76px; text-align:left; }
.entry-heading h1 { font-size:26px; font-weight:500; }
.phone-field { display:flex; align-items:center; background:#222; border-radius:7px; margin-top:25px; padding:12px; gap:10px; }
.phone-field input { background:transparent; border:0; color:#fff; padding:5px 0; width:100%; font-size:15px; outline:none; }
.phone-field:focus-within { outline:1px solid #aaa; }
.egypt-flag { width:18px; height:12px; background:linear-gradient(#ce2028 0 33%,#fff 33% 66%,#111 66%); flex-shrink:0; }
.validation-summary-errors { color:#ffb0b0; background:#3a1919; border-radius:6px; padding:12px; margin-top:14px; font-size:13px; }
.validation-summary-valid { display:none; }
.success-screen { text-align:center; }
.success-art { width:100%; height:390px; margin-top:90px; }
.success-art { object-fit:contain; }
.success-screen h1 { font-size:24px; font-weight:700; margin:70px 0 12px; }
.success-screen p { margin:0; font-size:16px; line-height:1.4; }
.success-screen .registration-footer { padding-top:32px; }
.success-screen .pill-next { min-width:180px; }
.v-back { display:grid; place-items:center; width:44px; height:44px; margin:max(55px, calc(4px + var(--app-safe-area-top, env(safe-area-inset-top, 0px)))) 0 76px -12px; }
.v-title { font-size:26px; font-weight:500; margin:0 0 8px; max-width:280px; }
.v-subtitle { font-size:13px; color:#777; margin:0 0 24px; }
#verifyForm { display:flex; flex-direction:column; flex:1; }
.otp-row { display:flex; gap:8px; padding:16px; background:#222; border-radius:6px; }
.otp-box { display:grid; place-items:center; height:30px; flex:1; border-bottom:1px solid #666; font-size:20px; }
.otp-box.current { border-color:#39ff35; }
.resend-row { font-size:12px; color:#999; margin-top:16px; }
.resend-row p { display:inline; margin-right:8px; }
.timer,.resend-link { color:#eee; }
.timer,.resend-link { background:none; border:0; padding:8px 0; font-size:12px; }
.resend-link { cursor:pointer; text-decoration:underline; }
.keypad { display:grid; grid-template-columns:repeat(3,1fr); gap:3px; margin:30px -30px 0; padding:4px 4px calc(4px + var(--app-safe-area-bottom, env(safe-area-inset-bottom, 0px))); background:#555; order:3; }
.key-btn { min-height:52px; border:0; border-radius:4px; background:#777; color:#fff; font-size:23px; }
.key-btn:active,.key-btn.pressed { background:#999; }
.verify-btn { display:flex; align-items:center; justify-content:center; margin: auto auto 0; width:54px; min-height:54px; border:0; border-radius:22px; background:var(--registration-accent); color:#123d10; font-size:0; }
.verify-btn i { font-size:18px; }
.verify-btn:disabled { background:#1d6a1b; }
.verify-screen { padding-bottom:0; }
.dev-banner { padding:10px; background:#3b321b; color:#f9de95; margin-bottom:12px; font-size:12px; }
.intro-screen { background:#fffaff; color:#111; padding:0 30px 94px; }
/* 55px is the Figma frame's, status bar included; a taller status bar pushes the row below it. */
.intro-screen .registration-nav { display:flex; justify-content:space-between; margin-top:max(55px, calc(4px + var(--app-safe-area-top, env(safe-area-inset-top, 0px)))); font-size:12px; }
/* A light page: the app shows dark status bar icons over it (see _AppSafeArea). */
body:has(.intro-screen) { --app-status-bar:dark; }
.intro-screen .skip-link { margin-right:-12px; }
.intro-screen .registration-nav>span { color:inherit; font-size:14px; }
.intro-slide { display:flex; flex:1; flex-direction:column; }
.intro-slide[hidden] { display:none; }
.intro-art { display:block; width:calc(100% + 60px); margin:15px -30px 0; height:54svh; min-height:230px; object-fit:contain; }
.intro-copy { margin-top:auto; padding-top:24px; }
.intro-copy h1 { font-size:30px; line-height:1.2; font-weight:700; margin:0 0 8px; letter-spacing:-.8px; }
.intro-copy p { font-size:14px; margin:0 0 24px; line-height:1.4; }
.intro-copy .pill-next { width:100%; min-width:0; border-radius:18px; justify-content:space-between; }
.intro-copy .pill-next span { font-size:26px; }
.gift-intro { background:radial-gradient(ellipse at 0 0,#483c43,transparent 65%),#242022; color:#fff; }
.gift-intro .intro-copy { text-align:center; }
.gift-intro .pill-next { justify-content:center; border-radius:28px; }
.gift-intro .intro-art { height:48svh; }
.intro-login { display:block; text-align:center; border:1px solid #888; color:#aaa; border-radius:28px; padding:15px; margin-top:12px; }
@media(max-width:390px) { .registration-screen { --gutter:26px; } .language-card,.gender-card { width:145px; height:205px; } .language-card.arabic,.gender-card.male { left:0; } .language-card.english,.gender-card.female { right:0; } }
/* On a 568px screen the icon step was 4px taller than the screen, so it moved when dragged. */
@media(max-height:600px) { .icon-screen .registration-footer { padding-top:24px; } }
@media(max-height:760px) { .language-screen .registration-heading { margin-top:65px; } .choice-fan { margin-top:30px; height:270px; } .gender-screen .choice-fan { margin-top:32px; } .registration-footer { padding-top:30px; } .name-field { margin-top:100px; } .age-option { height:110px; } .success-art { height:290px; margin-top:45px; } .success-screen h1 { margin-top:35px; } }
@media(max-height:760px) {
    .language-screen .choice-fan { margin-top:30px; }
    .intro-screen { padding-bottom:55px; }
    .intro-screen .registration-nav { margin-top:max(24px, calc(4px + var(--app-safe-area-top, env(safe-area-inset-top, 0px)))); }
    .intro-art { height:42svh; min-height:0; }
    .gift-intro .intro-art { height:38svh; }
    .intro-copy h1 { font-size:26px; }
    .intro-copy p { font-size:13px; }
    .avatar-preview { width:80px; height:80px; margin-top:24px; margin-bottom:16px; border-radius:20px; }
    .v-back { margin-top:max(24px, calc(4px + var(--app-safe-area-top, env(safe-area-inset-top, 0px)))); margin-bottom:34px; }
    .key-btn { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
@media(prefers-reduced-motion:reduce) {
    .choice-fan .language-card,.choice-fan .gender-card {
        transform:rotate(var(--rest-angle))!important;
    }
    .language-screen .round-next,.gender-screen .round-next { transform:none!important; }
}
