@layer native-app {
/* Authentication has its own centered shell; app navigation is not part of entry. */
#authScreen{min-height:100svh;background:var(--bg)}
.auth-topbar{position:absolute;inset:0 0 auto;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:24px 40px;pointer-events:none}
.auth-topbar>*{pointer-events:auto}
.auth-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:clamp(40px,6vw,96px);max-width:1080px;margin:auto}
.auth-scene{position:relative;min-height:0;height:clamp(510px,calc(100svh - 180px),600px);padding:24px 32px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;isolation:isolate;overflow:hidden;border:1px solid var(--rule);background:var(--surface)}
html[data-theme="pro"] .auth-scene{border-radius:36px;background:radial-gradient(ellipse at 22% 8%,color-mix(in srgb,var(--art) 15%,transparent),transparent 65%),radial-gradient(ellipse at 100% 100%,color-mix(in srgb,var(--art) 12%,transparent),transparent 60%),var(--surface);border-color:color-mix(in srgb,var(--art) 10%,var(--surface))}
.auth-scene::before{content:"";position:absolute;inset:0;z-index:-1;opacity:.23;background-image:radial-gradient(var(--art) .7px,transparent .7px);background-size:22px 22px;mask-image:linear-gradient(transparent,black 30%,transparent 85%)}
.auth-constellation{position:relative;width:340px;height:245px;flex-shrink:0;color:var(--art)}
.auth-orbit{position:absolute;border:1px solid color-mix(in srgb,var(--art) 22%,transparent);border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-22deg)}
.auth-orbit-outer{width:330px;height:238px}.auth-orbit-inner{width:230px;height:168px;transform:translate(-50%,-50%) rotate(28deg)}
.auth-seed{position:absolute;left:50%;top:50%;width:100px;height:100px;display:grid;place-items:center;transform:translate(-50%,-50%);background:var(--action);color:var(--on-action);border-radius:var(--radius);box-shadow:0 16px 40px color-mix(in srgb,var(--art) 15%,transparent)}
.auth-seed svg{width:54px;height:54px}
html[data-theme="pro"] .auth-seed{border-radius:28px;transform:translate(-50%,-50%) rotate(-8deg)}
.auth-float{position:absolute;display:flex;align-items:center;gap:12px;background:var(--bg);color:var(--fg);border:1px solid var(--rule);padding:14px 16px;border-radius:var(--radius);box-shadow:0 12px 28px #00000008;font-size:12px;text-align:start;animation:auth-drift 7s ease-in-out infinite;will-change:transform}
.auth-float svg{width:20px;height:20px;color:var(--art);flex-shrink:0}
.auth-float-note{right:0;top:16px;width:164px;--float-angle:7deg}
.auth-ink{display:block;width:83px;height:3px;margin-top:8px;background:var(--rule);border-radius:2px}.auth-ink.short{width:57px;margin-top:5px}
.auth-float-task{left:2px;top:144px;--float-angle:-7deg;animation-delay:-2s}
.auth-tiny-check{display:grid;place-items:center;width:23px;height:23px;background:var(--action);border-radius:calc(var(--radius) / 3)}.auth-tiny-check svg{width:15px;height:15px;color:var(--on-action)}
.auth-float-voice{right:16px;bottom:14px;--float-angle:3deg;animation-delay:-4s;padding:14px 18px}
.auth-wave{display:flex;align-items:center;gap:4px;height:36px}.auth-wave i{width:3px;height:var(--wave-height);background:var(--art);border-radius:3px}
.auth-spark{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--art)}.auth-spark-one{left:37px;top:42px}.auth-spark-two{right:45px;top:160px;width:4px;height:4px}
.auth-scene-copy{margin-top:18px}.auth-eyebrow{font-size:12px;font-weight:500;color:var(--art);display:block}
.auth-scene h2{font-size:clamp(32px,3.5vw,42px);line-height:1.35;letter-spacing:-1px;margin:12px 0 16px;font-weight:700}
.auth-scene p{font-size:14px;line-height:1.9;color:var(--muted);margin:0}
.auth-content{width:100%;max-width:370px;margin:0 auto;text-align:start;min-width:0}
.auth-step{margin-top:24px;display:grid;gap:20px}
#authScreen :is(button,a):focus-visible{outline:2px solid var(--art)!important;outline-offset:4px}
.auth-divider{display:flex;align-items:center;gap:16px;color:var(--muted);font-size:12px;margin:16px 0}
.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--rule);flex:1}
.auth-content .auth-google-btn{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:54px;color:#1f1f1f;background:#fff;border:1px solid #747775;border-radius:var(--radius);font-size:14px;font-weight:500;--bloom-color:#4285f428}
html:not(.light) .auth-content .auth-google-btn{background:#131314;color:#e3e3e3;border-color:#8e918f}
.auth-google-mark{width:20px;height:20px;flex-shrink:0}
.auth-code-actions{display:flex;justify-content:space-between;gap:10px;margin-top:12px}
/* The bloom lives below content and never changes button dimensions. */
.auth-bloom{position:relative;isolation:isolate;overflow:hidden;--bloom-color:color-mix(in srgb,var(--on-action) 24%,transparent)}
.auth-bloom>*{position:relative;z-index:1}
.auth-bloom::before{content:"";position:absolute;z-index:0;inset:-50%;background:radial-gradient(ellipse,var(--bloom-color),transparent 65%);filter:blur(8px);opacity:0;transform:scale(.05);transition:transform .65s cubic-bezier(.2,.7,.2,1),opacity .45s}
.auth-content .auth-bloom:hover{opacity:1}
.auth-bloom:is(:hover,:focus-visible)::before{opacity:1;transform:scale(1.6)}
.auth-bloom:active::before{transform:scale(2);opacity:1}
@keyframes auth-drift{0%,100%{transform:translateY(0) rotate(var(--float-angle))}50%{transform:translateY(-10px) rotate(calc(var(--float-angle) - 3deg))}}
@media(min-width:768px) and (max-width:1000px){.auth-layout{gap:32px}.auth-scene{padding-inline:18px;min-height:0}.auth-constellation{transform:scale(.87);margin-inline:-20px}}
/* Below tablet width the artwork becomes a compact mobile constellation. */
@media(max-width:767px){
 .auth-topbar{padding:16px 22px}
 .auth-layout{display:flex;flex-direction:column;gap:16px;max-width:390px}
 .auth-scene{width:100%;min-height:0;height:120px;background:none!important;border:0!important;padding:0;overflow:visible}
 .auth-scene::before,.auth-scene-copy{display:none}
 .auth-constellation{width:280px;height:170px;transform:scale(.85)}
 .auth-orbit-outer{width:270px;height:145px}.auth-orbit-inner{width:185px;height:120px}
 .auth-seed{width:74px;height:74px}.auth-seed svg{width:42px;height:42px}
 html[data-theme="pro"] .auth-seed{border-radius:23px}
 .auth-float{font-size:10px;padding:10px 12px;gap:8px;animation-name:auth-mobile-drift;animation-duration:8s}
 .auth-float-note{top:0;right:-4px;width:133px}.auth-ink{width:61px;height:2px;margin-top:6px}.auth-ink.short{width:40px;margin-top:4px}
 .auth-float-task{left:-7px;top:85px}.auth-float-voice{bottom:-5px;right:1px;padding:7px 11px}
 .auth-wave{height:30px;gap:3px;transform:scaleY(.7)}.auth-wave i{width:2px}
 .auth-spark-one{left:25px;top:7px}.auth-spark-two{right:11px;top:90px}
 .auth-content{max-width:370px;margin-top:10px}
 .auth-step{margin-top:26px;gap:18px}
}
@keyframes auth-mobile-drift{0%,100%{transform:translateY(0) rotate(var(--float-angle))}50%{transform:translateY(-7px) translateX(3px) rotate(calc(var(--float-angle) + 2deg))}}
@media(max-width:380px){.auth-code-actions{gap:6px}}
@media(max-height:700px) and (max-width:767px){.auth-scene{height:106px}.auth-constellation{transform:scale(.65)}.auth-layout{gap:16px}.auth-step{margin-top:22px}}
@media(prefers-reduced-motion:reduce){.auth-float{animation:none;will-change:auto;transform:rotate(var(--float-angle))}.auth-bloom::before{transition:none;filter:none}}


/* One six-second task cycle; recording bars vary independently. */
.auth-wave i{transform-origin:center;animation:auth-record-wave 1.2s ease-in-out infinite;animation-delay:calc(var(--bar) * -137ms)}
@keyframes auth-record-wave{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1.2)}}
.auth-float-task{min-width:140px}
.auth-task-before,.auth-task-after{grid-area:1/1}
.auth-task-after{position:absolute;inset-inline-start:50px;opacity:0;animation:auth-task-after 6s infinite}
.auth-task-before{animation:auth-task-before 6s infinite}
.auth-tiny-check{background:transparent;border:1px solid var(--art);animation:auth-task-check 6s infinite}
.auth-tiny-check svg{opacity:0;animation:auth-task-after 6s infinite}
@keyframes auth-task-before{0%,29%,96%,100%{opacity:1}34%,91%{opacity:0}}
@keyframes auth-task-after{0%,29%,96%,100%{opacity:0}34%,91%{opacity:1}}
@keyframes auth-task-check{0%,29%,96%,100%{background:transparent}34%,91%{background:var(--action)}}
.auth-confetti{position:absolute;inset:0;pointer-events:none}
.auth-confetti i{position:absolute;left:24px;top:50%;width:4px;height:6px;background:var(--art);opacity:0;--angle:calc(var(--piece) * 45deg);animation:auth-celebrate 6s ease-out infinite}
.auth-confetti i:nth-child(even){background:var(--fg)}
@keyframes auth-celebrate{0%,31%,52%,100%{opacity:0;transform:rotate(var(--angle)) translateY(0) scale(.3)}34%{opacity:1;transform:rotate(var(--angle)) translateY(-10px)}48%{opacity:0;transform:rotate(var(--angle)) translateY(-36px) rotate(100deg)}}
@media(prefers-reduced-motion:reduce){.auth-wave i,.auth-task-before,.auth-task-after,.auth-tiny-check,.auth-tiny-check svg,.auth-confetti i{animation:none}.auth-task-before,.auth-confetti{display:none}.auth-task-after{opacity:1}.auth-tiny-check{background:var(--action)}.auth-tiny-check svg{opacity:1}}

body.auth-open #app>:not(#authScreen),body.auth-open #bottomBar{display:none!important}
#authScreen{position:fixed;inset:0;z-index:1000;overflow-y:auto;background:var(--bg);color:var(--fg);display:grid;place-items:center;padding:90px 40px;isolation:isolate}
#authScreen::before,#authScreen::after{display:none}
#authScreen .auth-layout{width:100%}
#authScreen .auth-panel{padding:0;background:none}
#authScreen .auth-card{padding:0;margin:0;max-width:none}
#authScreen .auth-step{display:flex;flex-direction:column;gap:18px}
#authScreen .auth-step h2{margin:0 0 4px;line-height:1.5;color:var(--fg)}
#authScreen .auth-step p{margin:0;font-size:14px;color:var(--muted);line-height:1.9}
#authScreen .auth-eyebrow{color:var(--art);font-size:12px}
#authScreen .auth-input-group{display:flex;flex-direction:column;gap:8px}
#authScreen .auth-label{font-size:13px;color:var(--fg);text-align:start}
#authScreen .auth-input{width:100%;min-width:0;min-height:54px;padding:14px 16px;background:var(--surface);color:var(--fg);border:1px solid transparent;border-radius:var(--radius);font:inherit;font-size:15px}
#authScreen .auth-otp-input{text-align:center;letter-spacing:8px;font-size:24px}
#authScreen .auth-btn{width:100%;min-height:54px;display:flex;align-items:center;justify-content:center;gap:12px;padding:0 20px;background:var(--action);color:var(--on-action);border:0;border-radius:var(--radius);font:inherit;font-weight:500;cursor:pointer}
#authScreen .auth-btn:disabled{opacity:.55;cursor:wait}
#authScreen .auth-btn:disabled::after{content:'';width:16px;height:16px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .8s linear infinite}
#authScreen .auth-google-option{order:3}
#authScreen .auth-google-btn img{width:20px;height:20px}
#authScreen .auth-legal-copy{order:4;display:flex;gap:5px;flex-wrap:wrap;align-items:center;justify-content:center;font-size:13px;margin-top:24px}
#authScreen .auth-legal-copy a{min-height:44px;display:inline-flex;align-items:center;color:var(--muted)}
#authScreen .auth-home-link{display:flex;align-items:center;gap:10px;font-size:23px;color:var(--fg);text-decoration:none}
#authScreen .auth-home-link svg{width:26px;height:26px;color:var(--art)}
#authScreen .auth-theme-toggle{width:44px;height:44px;display:grid;place-items:center;background:transparent;color:var(--fg);border:0;cursor:pointer}
#authScreen .auth-theme-toggle svg{width:22px;height:22px}
#authScreen .auth-alt-link{background:none;color:var(--muted);border:0;font:inherit;min-height:44px;cursor:pointer;font-size:12px}
#authScreen .auth-error{order:2;color:var(--danger);background:none;border:0;font-size:12px;line-height:1.8}
#authScreen .auth-email-display{overflow-wrap:anywhere}
#authScreen :is(button,a):focus-visible{outline:2px solid var(--art)!important;outline-offset:4px}
html:not([data-theme="pro"]) #authScreen .auth-orbit{border-radius:50%!important}
html:not([data-theme="pro"]) #authScreen .auth-spark{border-radius:50%!important}
@media(max-width:767px){#authScreen{padding:80px 26px}#authScreen .auth-content{margin-top:10px}#authScreen .auth-step h2,#authScreen .auth-eyebrow{text-align:center}#authScreen .auth-step{gap:18px}#authScreen .auth-home-link{font-size:21px}}
@media(max-height:700px) and (max-width:767px){#authScreen{padding-top:78px;padding-bottom:28px}}
html body #authScreen .auth-input{border:1px solid transparent!important;outline:none!important;box-shadow:none}
html body #authScreen .auth-input:is(:focus,:focus-visible){border-color:transparent!important;outline:none!important;box-shadow:0 0 12px 0 color-mix(in srgb,var(--art) 8%,transparent)!important}
html body #authScreen .auth-shell{min-height:0}

}

@layer native-app {
#authScreen{scrollbar-width:none}
#authScreen::-webkit-scrollbar{display:none}
#authScreen .auth-name-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#authScreen .auth-btn .theme-icon{width:20px;height:20px}
#authScreen .auth-step :is(#authResendOtp,#authBackToStep1FromPhone,#authResendEmail,#authBackFromEmailVerify){min-height:38px}
#authScreen #authStep3 textarea{min-height:96px}
}
