/* One account form, with a sliding desktop panel and an integrated mobile card. */
#profile-dialog{--auth-paper:#141c2e;--auth-ink:#eff0fb;--auth-muted:#a4aec4;--auth-field:#1c263b;--auth-edge:#8490b433;width:min(900px,calc(100vw - 48px));padding:0;border-radius:26px;max-height:90dvh;overflow:auto;background:var(--auth-paper);color:var(--auth-ink);border:1px solid var(--auth-edge);box-shadow:0 30px 110px #11162f66}
html[data-theme=light] #profile-dialog{--auth-paper:#fff;--auth-ink:#23243d;--auth-muted:#72778c;--auth-field:#f5f5fa;--auth-edge:#e3e3ed;background:var(--auth-paper)}
#profile-dialog .dialog-close{z-index:5;color:var(--auth-muted);background:var(--auth-paper);border-color:var(--auth-edge);width:31px;height:31px;right:14px;left:auto;top:14px}
.auth-shell{position:relative;min-height:590px;direction:ltr;isolation:isolate;overflow:hidden;border-radius:inherit}
.auth-form-panel{position:relative;width:50%;margin-left:50%;padding:42px 34px 28px;transition:transform .65s cubic-bezier(.65,0,.2,1);min-height:590px;display:flex;flex-direction:column;justify-content:center;text-align:start;color:var(--auth-ink)}
.auth-intro{position:relative}.auth-mobile-topline{display:contents}.auth-mobile-brand,.auth-mode-tabs{display:none}
#profile-dialog .auth-intro>.eyebrow{font-size:9px;letter-spacing:1.6px;color:var(--purple);line-height:1.8}
#profile-dialog h2{font-size:28px!important;line-height:1.2;letter-spacing:-1px;margin:10px 0;color:var(--auth-ink);text-wrap:balance}
#profile-dialog .dialog-description{font-size:12px!important;line-height:1.7;color:var(--auth-muted);margin:0 0 14px;min-height:0}
#profile-dialog form{gap:0}#profile-dialog .auth-field{display:flex;flex-direction:column;margin-top:10px}
#profile-dialog label{font-size:11px!important;line-height:1.5;margin:0 0 5px;color:var(--auth-muted)}
#profile-dialog input{width:100%;height:44px!important;min-width:0;border:1px solid var(--auth-edge);border-radius:8px;padding:11px 13px;background:var(--auth-field);color:var(--auth-ink);font-size:12px!important;font-family:inherit;transition:border-color .2s,box-shadow .2s}
#profile-dialog input:focus{outline:none;border-color:#9470c1;box-shadow:0 0 0 3px #a279d41c}
.auth-password-input{position:relative}.auth-password-input input{padding-inline-end:45px!important}.auth-password-input button{position:absolute;top:0;right:0;height:44px;width:42px;color:var(--auth-muted);display:grid;place-items:center}.auth-password-input svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5}.auth-eye-slash{display:none}[data-auth-password-toggle][aria-pressed=true] .auth-eye-slash{display:block}
#profile-dialog .auth-forgot{font-size:10px;color:var(--purple);align-self:flex-end;margin-top:11px;text-decoration:underline;text-underline-offset:3px;min-height:24px}
#profile-dialog #profile-submit{margin-top:16px;width:100%;min-height:44px;font-size:12px;gap:12px;border-radius:8px;background:linear-gradient(110deg,#7853be,#a84c99);color:white;border:1px solid #ab7cd1}#profile-dialog #profile-submit svg{width:16px;height:16px}
#profile-dialog .profile-note{font-size:9px!important;line-height:1.7;color:var(--auth-muted);margin:14px 0 0}#profile-dialog .profile-note svg{width:13px;height:13px;flex-shrink:0}
.auth-mobile-switch{display:none}#profile-dialog .form-error{font-size:11px;line-height:1.7;padding:10px;margin:5px 0 4px}#profile-dialog .form-error[data-state=success]{background:#61bd8b12;color:#76cfaa;border-color:#61bd8b55}html[data-theme=light] #profile-dialog .form-error[data-state=success]{color:#216b50}#profile-dialog .form-error[data-state=loading]{color:var(--auth-muted);background:var(--auth-field);border-color:var(--auth-edge)}
/* Desktop keeps its two connected sliding panels. */
.auth-welcome-panel{position:absolute;left:0;top:0;bottom:0;width:50%;z-index:2;padding:30px 32px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;text-align:center;color:#fff;background:radial-gradient(ellipse at 25% 20%,#a465d9,transparent 65%),linear-gradient(145deg,#6a47ad,#5556a6 65%,#495b8e);border-radius:24px 110px 110px 24px;transition:transform .65s cubic-bezier(.65,0,.2,1),border-radius .65s cubic-bezier(.65,0,.2,1)}
.auth-welcome-brand{display:flex;align-items:center;gap:10px;font:700 22px/1.4 Space,Arial,sans-serif;align-self:flex-start;color:#fff}.auth-welcome-brand img{width:35px;height:35px}
.auth-welcome-copy{max-width:270px}.auth-welcome-copy h3{font-size:27px;line-height:1.2;letter-spacing:-1px;text-wrap:balance;color:#fff}.auth-welcome-copy p{font-size:12px;line-height:1.9;color:#e5ddf4;margin:15px 0 21px}.auth-welcome-copy button{display:inline-flex;align-items:center;justify-content:center;gap:13px;font-size:11px;padding:10px 22px;line-height:1.8;border:1px solid #ffffff85;border-radius:8px;color:#fff;background:#ffffff08;min-width:170px}.auth-welcome-copy button:hover{background:#ffffff20}.auth-welcome-copy svg{width:16px;height:16px}.auth-greetings{display:flex;align-items:center;justify-content:center;gap:27px;font-size:11px;color:#d8d4ef;margin-top:20px}
#profile-dialog[data-auth-mode=signUp] .auth-form-panel,#profile-dialog[data-auth-mode=reset] .auth-form-panel{transform:translateX(-100%)}#profile-dialog[data-auth-mode=signUp] .auth-welcome-panel,#profile-dialog[data-auth-mode=reset] .auth-welcome-panel{transform:translateX(100%);border-radius:110px 24px 24px 110px}
#profile-dialog button:focus-visible{outline:2px solid #aa87db;outline-offset:3px}#profile-dialog .auth-welcome-panel button:focus-visible{outline-color:#fff}#profile-dialog button:disabled{opacity:.55;cursor:wait}
html[dir=rtl] .auth-form-panel{direction:rtl}html[dir=rtl] #profile-dialog h2{letter-spacing:0;line-height:1.5;font-size:26px!important}html[dir=rtl] .auth-welcome-copy{direction:rtl}html[dir=rtl] .auth-welcome-copy h3{letter-spacing:0;line-height:1.7;font-size:24px}html[dir=rtl] .auth-password-input button{right:auto;left:0}html[dir=rtl] #profile-submit svg,html[dir=rtl] .auth-welcome-copy button svg{rotate:180deg}
/* Providers follow the title and line up with the fields on desktop. */
.auth-social{margin:0 0 5px}.auth-social-caption{display:none}.auth-email-divider{display:flex;align-items:center;justify-content:center;gap:10px;font-size:10px;color:var(--auth-muted);line-height:1.6;text-align:center;margin:12px 0 0}.auth-email-divider:before,.auth-email-divider:after{content:'';height:1px;background:var(--auth-edge);flex:1}
.auth-provider-buttons{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin:0}
#profile-dialog .auth-provider{width:44px;height:44px;flex:0 0 44px;padding:0;display:grid;place-items:center;border:1px solid var(--auth-edge);border-radius:11px;background:var(--auth-field);color:var(--auth-ink);box-shadow:0 3px 10px #18204408;transition:transform .2s,border-color .2s,background .2s}
#profile-dialog .auth-provider:hover{transform:translateY(-2px);border-color:#a982d4;background:var(--auth-paper)}.auth-provider img{display:block;object-fit:contain}.auth-provider-google img{width:23px;height:23px}.auth-provider-facebook img{width:25px;height:25px}#profile-dialog .auth-provider-apple svg{width:25px;height:25px;fill:currentColor;stroke:none}
@media(max-width:700px){
 #profile-dialog{width:min(430px,calc(100vw - 24px));border-radius:23px;max-height:calc(100dvh - 24px);overflow:hidden}
 #profile-dialog .auth-shell{min-height:0;height:var(--auth-fit-height,auto);display:block;overflow:hidden;background:var(--auth-paper)}
 #profile-dialog .auth-form-panel{position:relative;z-index:1;width:100%;margin:0;padding:18px 22px 20px;min-height:0;justify-content:flex-start;transform:scale(var(--auth-fit,1));transform-origin:top center;transition:none}
 #profile-dialog[data-auth-mode=signUp] .auth-form-panel,#profile-dialog[data-auth-mode=reset] .auth-form-panel{transform:scale(var(--auth-fit,1))}
 .auth-mobile-topline{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:10px;padding-inline-end:30px;margin-bottom:18px;min-height:38px}
 .auth-mobile-brand{display:block;line-height:0}.auth-mobile-brand img{height:28px;width:28px;object-fit:contain}
 .auth-mode-tabs{display:flex;align-items:center;gap:3px;padding:3px;margin:0;min-width:0;border:1px solid var(--auth-edge);border-radius:10px;background:var(--auth-field)}
 #profile-dialog .auth-mode-tabs button{flex:1;min-width:0;padding:6px 4px;border-radius:7px;min-height:32px;font-size:11px;color:var(--auth-muted);line-height:1.5}
 #profile-dialog .auth-mode-tabs button[aria-pressed=true]{color:var(--auth-ink);background:var(--auth-paper);box-shadow:0 2px 9px #11152e10}
 #profile-dialog .auth-intro>.eyebrow{display:none}#profile-dialog h2{font-size:26px!important;line-height:1.2;margin:0 0 16px;letter-spacing:-.8px;text-wrap:balance}
 #profile-dialog .dialog-description{display:none}#profile-dialog[data-auth-mode=reset] .dialog-description,#profile-dialog[data-auth-signed-in=true] .dialog-description{display:block;font-size:12px!important;margin:0 0 12px}
 .auth-social{margin:0 0 4px}.auth-provider-buttons{justify-content:center;gap:14px}.auth-email-divider{margin-top:10px;font-size:10px}
 #profile-dialog .auth-field{position:relative;margin-top:9px;min-height:52px}#profile-dialog .auth-field>label{position:absolute;z-index:1;inset-inline-start:13px;top:7px;margin:0;font-size:10px!important;line-height:1.2;pointer-events:none}
 #profile-dialog input{font-size:16px!important;height:52px!important;padding:23px 13px 7px;border-radius:10px}#profile-dialog .auth-password-input button{height:52px}
 #profile-dialog .auth-forgot{font-size:11px;min-height:25px;margin-top:7px}#profile-dialog #profile-submit{font-size:14px;min-height:44px;margin-top:12px;border-radius:10px}
 #profile-dialog .profile-note{font-size:9px!important;line-height:1.6;margin-top:12px}.auth-mobile-switch{display:none}
 #profile-dialog .form-error{font-size:11px;line-height:1.5;padding:8px 10px;margin:7px 0 3px}
 #profile-dialog .dialog-close{top:20px;right:13px;left:auto;width:28px;height:28px;background:var(--auth-field);color:var(--auth-muted);border-color:var(--auth-edge)}
 html[dir=rtl] #profile-dialog .dialog-close{right:auto;left:13px}html[dir=rtl] #profile-dialog h2{font-size:24px!important;line-height:1.4}
 /* The W illustration is part of the same surface; it takes no vertical space. */
 #profile-dialog .auth-welcome-panel,#profile-dialog[data-auth-mode=signUp] .auth-welcome-panel,#profile-dialog[data-auth-mode=reset] .auth-welcome-panel{position:absolute;inset:0;z-index:0;width:100%;padding:0;min-height:0;display:block;border-radius:inherit;transform:none;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at 90% 10%,#aa6ee52b,transparent 62%);transition:opacity .5s}
 #profile-dialog .auth-welcome-brand,#profile-dialog .auth-welcome-copy,#profile-dialog .auth-greetings{display:none}
 #profile-dialog[data-auth-density=compact] .auth-form-panel{padding:14px 20px 16px}
 #profile-dialog[data-auth-density=compact] .auth-mobile-topline{margin-bottom:12px;min-height:36px}
 #profile-dialog[data-auth-density=compact] h2{font-size:23px!important;margin-bottom:12px}
 #profile-dialog[data-auth-density=compact] .auth-field{margin-top:7px;min-height:48px}#profile-dialog[data-auth-density=compact] input{height:48px!important;padding-top:21px;padding-bottom:5px}
 #profile-dialog[data-auth-density=compact] .auth-password-input button{height:48px}
 #profile-dialog[data-auth-density=compact] .auth-provider{width:40px;height:40px;flex-basis:40px}
 #profile-dialog[data-auth-density=compact] .auth-email-divider{margin-top:7px}
 #profile-dialog[data-auth-density=compact] #profile-submit{margin-top:10px;min-height:42px}
 #profile-dialog[data-auth-density=compact] .profile-note{font-size:8px!important;margin-top:10px}
 #profile-dialog[data-auth-density=compact] .dialog-close{top:18px}
}
@media(prefers-reduced-motion:reduce){.auth-form-panel,.auth-welcome-panel,#profile-dialog .auth-provider{transition:none}}

/* Mobile account creation: move the color through the existing card. */
@media(max-width:700px){
 #profile-dialog .auth-shell::before{
  content:'';position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 22% 74%,#a56bda88,transparent 65%),linear-gradient(165deg,#273d59 0%,#3b4c73 20%,#68519e 46%,#8152a9 72%,#5b416f 100%);
  opacity:0;transform:translateY(-28%) scaleY(.76);transform-origin:top;
  transition:opacity .65s ease,transform .65s cubic-bezier(.65,0,.2,1);
 }
 html #profile-dialog[data-auth-mode=signUp]{
  --auth-paper:#322749;--auth-ink:#fff;--auth-muted:#eee8f7;
  --auth-field:#21193480;--auth-edge:#ffffff38;
 }
 #profile-dialog[data-auth-mode=signUp] .auth-shell::before{opacity:1;transform:translateY(0) scaleY(1)}
 #profile-dialog[data-auth-mode=signUp] .auth-form-panel{--purple:#ead4ff}
 #profile-dialog[data-auth-mode=signUp] input::placeholder{color:#ded5ed;opacity:1}
 #profile-dialog[data-auth-mode=signUp] #profile-submit{background:linear-gradient(110deg,#653d9b,#913c89);border-color:#d3abe7}
 #profile-dialog[data-auth-mode=signUp] .form-error{color:#ffe0eb;background:#271c3dcc;border-color:#e4a2c366}
 #profile-dialog[data-auth-mode=signUp] .form-error[data-state=success]{color:#c5ffe4;background:#1b343599;border-color:#93d6b466}
 #profile-dialog[data-auth-mode=signUp] .form-error[data-state=loading]{color:var(--auth-muted);background:var(--auth-field);border-color:var(--auth-edge)}
 #profile-dialog h2,#profile-dialog .auth-field>label,#profile-dialog .auth-email-divider,#profile-dialog .profile-note,#profile-dialog .auth-mode-tabs button{transition:color .65s ease,background-color .65s ease,border-color .65s ease}
 #profile-dialog input{transition:border-color .2s,box-shadow .2s,background-color .65s ease,color .65s ease}
 #profile-dialog .auth-email-divider::before,#profile-dialog .auth-email-divider::after{transition:background-color .65s ease}
 html[data-theme=light] #profile-dialog[data-auth-mode=signUp] .language-orbit-profile .lo-chip{color:#eadff7!important;background:#ffffff12!important;border-color:#ffffff38!important}
 html[data-theme=light] #profile-dialog[data-auth-mode=signUp] .language-orbit-profile .lo-center{background:#ffffff12!important;border-color:#ffffff38}
 html[data-theme=light] #profile-dialog[data-auth-mode=signUp] .language-orbit-profile .lo-ring{border-color:#ffffff38}
}
@media(max-width:700px) and (prefers-reduced-motion:reduce){
 #profile-dialog .auth-shell::before,#profile-dialog .auth-form-panel *,#profile-dialog .auth-email-divider::before,#profile-dialog .auth-email-divider::after{transition:none!important}
}
/* Signed-in account menu under the header name */
.profile-menu{--pm-paper:#141c2e;--pm-ink:#eff0fb;--pm-muted:#a4aec4;--pm-edge:#8490b433;--pm-hover:#ffffff10;position:fixed;z-index:1000;padding:8px;border-radius:16px;background:var(--pm-paper);color:var(--pm-ink);border:1px solid var(--pm-edge);box-shadow:0 18px 50px #0a0f2466;animation:pm-in .16s ease-out}
html[data-theme=light] .profile-menu{--pm-paper:#fff;--pm-ink:#23243d;--pm-muted:#72778c;--pm-edge:#e3e3ed;--pm-hover:#f3f2f9;box-shadow:0 18px 50px #2b2a5a26}
.profile-menu[hidden]{display:none}
.profile-menu-head{display:flex;align-items:center;gap:10px;padding:8px 8px 12px;margin-bottom:6px;border-bottom:1px solid var(--pm-edge)}
.profile-menu-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#a855f7,#ec4899);color:#fff;font-weight:700}
.profile-menu-who{display:flex;flex-direction:column;min-width:0}
.profile-menu-name{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-menu-email{font-size:12px;color:var(--pm-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}
.profile-menu-item{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;border-radius:10px;background:none;color:inherit;font:inherit;font-size:14px;text-align:start;cursor:pointer}
.profile-menu-item:hover,.profile-menu-item:focus-visible{background:var(--pm-hover);outline:none}
.profile-menu-item svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.profile-menu-item.is-danger{color:#f0627d}
html[data-theme=light] .profile-menu-item.is-danger{color:#d43a5a}
@keyframes pm-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.profile-menu{animation:none}}

/* Email verification notice (email/password accounts) */
#profile-dialog .auth-verify{margin:12px 0 4px;padding:12px 14px;border:1px solid color-mix(in srgb,#f59e0b 45%,transparent);border-radius:12px;background:color-mix(in srgb,#f59e0b 10%,transparent);text-align:start}
#profile-dialog .auth-verify[hidden]{display:none}
#profile-dialog .auth-verify-text{margin:0 0 10px;font-size:13px;line-height:1.55;color:var(--auth-ink)}
#profile-dialog .auth-verify-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#profile-dialog .auth-verify-resend{min-height:36px;padding:0 16px;font-size:13px}
#profile-dialog .auth-verify-check{font-size:13px;color:var(--auth-muted);text-decoration:underline;text-underline-offset:3px}
