/* Portal composition: viewport-centred actions, independent light field. */
body:has(.account-portal){overflow:auto;background:#0b1116}
.account-portal{position:relative;isolation:isolate;min-height:100svh;overflow:clip;background:#0b1116;color:#eeeae0;padding:0 clamp(24px,5vw,88px) 24px;color-scheme:dark}
.portal-header{height:96px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:2;max-width:1400px;margin:auto}
.portal-brand{display:inline-flex;align-items:center;gap:18px;font:27px/1.3 var(--serif);letter-spacing:5px;color:#e9e1ce;text-decoration:none}
.brand-seed{width:6px;height:6px;border-radius:50%;background:#c5ba95;box-shadow:0 0 14px #d2c49a55}
.portal-motion{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;color:#a6b4b8;background:#ffffff04;border:1px solid #ffffff0b}
.portal-motion:hover{background:#ffffff0d;color:#eee5cf}.portal-motion svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
.portal-light{position:absolute;z-index:-1;inset:0;pointer-events:none;overflow:hidden;background:radial-gradient(ellipse at 28% 48%,#283c4433,transparent 55%)}
.portal-light canvas{width:100%;height:100%;display:block;opacity:0;transition:opacity 1.2s ease}
.portal-light[data-rendered=true] canvas{opacity:1}.portal-light>img{position:absolute;left:-4%;top:13%;width:67%;height:72%;object-fit:contain;opacity:.75;transition:opacity .7s}
.portal-light[data-rendered=true]>img{opacity:0}
.account-stage{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(350px,.85fr);align-items:center;gap:clamp(40px,7vw,108px);max-width:1200px;min-height:calc(100svh - 120px);margin:0 auto;padding:20px 0 36px}
.account-intro{position:sticky;align-self:start;top:calc(50svh - 125px);margin-top:max(52px,calc(50svh - 237px));padding:0 0 0 14px;pointer-events:none}
.account-eyebrow{font-size:12px;letter-spacing:.24em;color:#c3b58d;display:flex;align-items:center;gap:12px}
.account-eyebrow:before{content:"";width:22px;height:1px;background:#b4a57e}
.account-intro h1{font:400 clamp(36px,3.6vw,54px)/1.4 var(--serif);letter-spacing:.03em;max-width:560px;margin:24px 0 20px;color:#f0e9d9;text-wrap:balance}
.account-intro>p{font-size:14px;line-height:1.8;color:#a9b6bb;max-width:370px}
.account-form-surface{width:100%;max-width:470px;justify-self:end;background:linear-gradient(145deg,#172027ed,#10171dee);border:1px solid #c9dbdf1c;border-radius:22px;padding:30px 34px;box-shadow:0 30px 80px #00000030,inset 0 1px #ffffff05;backdrop-filter:blur(22px);animation:account-arrive .32s ease-out}
.account-tabs{display:flex;gap:0;border-bottom:1px solid #d8e4e41c;margin:0 0 22px;position:relative}
.account-tabs button{position:relative;flex:1;font-size:16px;color:#a1b0b6;padding:0 0 14px;background:none;min-height:42px}
.account-tabs button.selected{color:#f4ead4}.account-tabs:after{content:"";position:absolute;bottom:-1px;left:0;width:50%;height:2px;background:#d6c394;box-shadow:0 0 14px #cfb58045;transition:transform .28s cubic-bezier(.2,.7,.2,1)}
.account-portal[data-page=register] .account-tabs:after,.account-portal[data-page=join] .account-tabs:after{transform:translateX(100%)}
.account-form-surface label{font-size:13px;font-weight:400;color:#c5d0d3;margin:15px 0 0}
.account-form-surface input:not([type=file]),.account-form-surface textarea{background:#0c131a;color:#f0f1ec;border:1px solid #a6bac329;border-radius:9px;font:15px/1.6 var(--sans);padding:11px 13px;width:100%;margin-top:7px;outline-offset:3px;transition:border-color .18s,box-shadow .18s;caret-color:#deca98}
.account-form-surface input::placeholder,.account-form-surface textarea::placeholder{color:#84949d;opacity:1}
.account-form-surface input:focus,.account-form-surface textarea:focus{border-color:#c8b482a6;box-shadow:0 0 0 3px #c7b3840c}
.account-form-surface input:autofill{background:#0c131a;color:#f0f1ec}.account-form-surface input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #0c131a inset;-webkit-text-fill-color:#f0f1ec;caret-color:#deca98}
.account-form-surface .primary{position:relative;display:flex;align-items:center;justify-content:center;gap:14px;width:100%;margin-top:14px;background:#e6ddc6;color:#222b2c;border:1px solid #f0e7d12e;border-radius:9px;min-height:48px;font-size:15px;font-weight:500;transition:background .18s,box-shadow .18s,transform .15s}
.account-form-surface .primary:after{content:"→";transition:transform .2s}.account-form-surface .primary:hover:not(:disabled){background:#f2e8d0;box-shadow:0 5px 24px #ddc79812}.account-form-surface .primary:hover:after{transform:translateX(3px)}.account-form-surface .primary:active:not(:disabled){transform:scale(.985)}
.account-error{color:#e2ae98!important;font-size:13px;line-height:1.7;min-height:20px;margin:12px 0 0;overflow-wrap:anywhere}.account-identity{display:flex;justify-content:space-between;gap:16px;color:#a6b39e;font-size:12px;line-height:1.7}.account-avatar{display:inline-flex;width:38px;height:38px;align-items:center;justify-content:center;border-radius:50%;background:#bbc5ac18;color:#d1dbc5;flex:none}.profile-materials{margin-top:24px}.profile-material-title{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:13px;color:#bac3b3}.profile-upload{position:relative;overflow:hidden;color:#d0dbc4!important;cursor:pointer;margin:0!important;font-size:12px!important;min-height:36px;display:flex;align-items:center}.profile-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.profile-materials #profile-material-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #ffffff13;padding:9px 0;font-size:13px}.profile-materials #profile-material-list>div>span{min-width:0;overflow-wrap:anywhere}.profile-materials .text-button{font-size:12px;color:#a7b39e}.account-muted{font-size:12px;color:#8e9c8c!important;line-height:1.8;margin:8px 0}.existing-groups{margin-bottom:28px}.group-option{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:17px 0;color:#eee8d8;border-bottom:1px solid #ffffff16;gap:16px}.group-option strong{display:block;font-size:17px;font-weight:500}.group-option small{display:block;font-size:12px;color:#97a28e;margin-top:7px}.group-option>span:last-child{font-size:12px;white-space:nowrap;color:#bfc9ae}.portal-account{display:flex;align-items:center;justify-content:space-between;margin-top:25px;padding-top:15px;border-top:1px solid #ffffff13;font-size:12px;color:#a9b49f}.portal-account button{color:#aebba5;font-size:12px}.group-code{display:flex;align-items:center;gap:18px;padding-bottom:20px;border-bottom:1px solid #333;flex-wrap:wrap}.group-code>span{font-size:13px;color:#aaa}.group-code strong{font:500 20px/1.5 ui-monospace,monospace;letter-spacing:2px}.group-code button{margin-left:auto}.group-members h3{font:500 18px/1.5 var(--sans);margin:25px 0 8px}.group-members article{display:flex;gap:15px;padding:18px 0;border-bottom:1px solid #222}.group-members article>div{min-width:0;flex:1}.group-members strong{font-size:15px;font-weight:500}.group-members small{display:block;font-size:12px;margin-top:4px;color:#aaa}.group-members details{font-size:13px;margin-top:8px}.group-members pre{max-height:250px;overflow:auto;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.group-add{margin-top:24px}.group-member-search{display:flex;gap:10px;margin:8px 0}.group-member-search input{min-width:0;flex:1}.group-member-search button{flex:none}#local-member-results article{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 0;border-top:1px solid #222}#local-member-results small{display:block;font-size:12px;margin-top:4px}.group-switch,.profile-logout{border-top:1px solid #333;padding-top:18px;margin-top:24px}.group-nav-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-nav{color:#ddd!important}.profile-nav .account-avatar{width:28px;height:28px;font-size:11px}.profile-suggestion{font-size:13px;color:#bac8ac!important;margin-top:12px!important}.group-roster{display:flex;gap:10px;align-items:center;color:#b6c3ad;font-size:12px;padding:14px 0}.group-roster .person-dot{width:26px;height:26px}.startup-error{padding:50px;color:#e9c8b5}@keyframes account-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes portal-breathe{to{opacity:.45;transform:rotateX(65deg) rotate(-18deg) scale(1.03)}}@media(prefers-reduced-motion:reduce){.portal-orbit,.account-form-surface{animation:none}}
@media(max-width:760px){.group-workbench .world-header{height:112px;display:grid;grid-template-columns:1fr auto;grid-template-rows:54px 40px;gap:0 8px;padding:6px 18px}.group-workbench .world-header>.wordmark{grid-column:1;grid-row:1}.group-workbench #world-tools{display:contents}.group-workbench .garden-utilities{grid-column:2;grid-row:1;justify-content:flex-end;border:0;padding:0}.group-workbench .group-nav-name{grid-column:1;grid-row:2;justify-self:start;max-width:185px;padding-left:0!important}.group-workbench .garden-navigation{grid-column:2;grid-row:2;justify-content:flex-end}.group-workbench .garden-stage{top:118px}.group-workbench .garden-footer>span{max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
#world-tools .group-nav-name{display:block;line-height:1.5;text-align:left}
/* Account actions share one weight, focus treatment, and hit area. */
.account-form-surface form>label{display:block}.password-field{position:relative}.account-form-surface .password-field input{padding-right:50px}.password-toggle{position:absolute;right:5px;top:12px;display:grid;place-items:center;width:40px;height:40px;min-height:40px;color:#aeb6ac;border-radius:6px;background:transparent}.password-toggle:hover,.password-toggle[aria-pressed=true]{background:#ffffff0a;color:#eeeae0}.password-toggle svg{width:20px;height:20px}.account-form-surface :focus-visible{outline:2px solid #d1d4c0;outline-offset:3px}.account-form-surface :disabled{cursor:not-allowed}.social-divider{display:flex;align-items:center;gap:14px;margin:28px 0 18px;color:#8f9a91;font-size:12px;white-space:nowrap}.social-divider:before,.social-divider:after{content:"";height:1px;flex:1;background:#ffffff18}.social-logins{display:grid;grid-template-columns:1fr 1fr;gap:12px}.social-login{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 12px;background:#111617;border:1px solid #ffffff24;border-radius:9px;color:#e7e9e0;font:14px var(--sans);transition:background .15s,border-color .15s}.social-login svg{width:19px;height:19px;flex:none}.social-login:hover:not(:disabled){background:#1a221d;border-color:#bdc6b266}.social-login:disabled{color:#9ca49c;border-color:#ffffff14;background:#0c1011}.social-login:disabled svg{filter:grayscale(1);opacity:.6}.social-login small{font-size:10px;color:#8c968d}.social-login[aria-busy=true]{opacity:.7}.social-login[aria-busy=true] svg{animation:portal-breathe 1s ease-in-out infinite alternate}@media(max-width:420px){.social-logins{gap:9px}.social-login{gap:7px;padding:10px 7px;font-size:13px}}
.account-form-surface .social-login:disabled{opacity:1;color:#a7afa5}.account-form-surface .social-login:disabled small{color:#8f998f}

/* Account-only rhythm; does not alter workspace dialogs. */
.account-portal .account-identity{font-size:12px;color:#a8bac2;margin-bottom:16px;gap:10px}.account-portal .account-identity span:last-child{font-size:11px;color:#8fa3ac}
.account-portal .form-pair{gap:14px;grid-template-columns:1fr 1fr}
.account-portal textarea[name=experience]{min-height:90px;max-height:220px}
.account-portal .profile-materials{margin-top:18px}.account-portal .profile-material-title{color:#afc0c8}.account-portal .profile-upload{color:#d2c39f!important}
.account-portal .account-muted{color:#94a5ae!important}.account-portal .account-error{margin-top:9px;min-height:18px;line-height:1.5}
.account-portal .portal-account{margin-top:18px;padding-top:14px;border-color:#c8d6df16;color:#a0b1b9}.account-portal .portal-account button{color:#aebbc1;min-height:32px;padding:0}
.account-portal .social-divider{margin:21px 0 14px;color:#93a5af}.account-portal .social-login{background:#111a21;border-color:#a6bac329;color:#d4dde0}
.account-portal .existing-groups{max-height:220px;overflow:auto}.account-portal .login-remembered{max-height:160px;overflow:auto}
.account-portal[data-page=profile] .account-form-surface{padding-top:24px;padding-bottom:20px}.account-portal .profile-materials .account-muted{margin-bottom:0}
@media(min-width:761px) and (max-height:800px){.portal-header{height:76px}.account-stage{min-height:calc(100svh - 100px);padding:12px 0}.account-intro{margin-top:max(52px,calc(50svh - 205px))}.account-form-surface{padding:24px 28px}.account-intro h1{font-size:44px}.account-portal[data-page=profile] .account-form-surface{padding:20px 28px 14px}.account-portal[data-page=profile] label{margin-top:10px}.account-portal[data-page=profile] .profile-materials{margin-top:12px}.account-portal[data-page=profile] .portal-account{margin-top:10px;padding-top:8px}}
@media(max-width:760px){.account-portal{padding:0 22px 30px}.portal-header{height:76px}.portal-brand{font-size:23px;letter-spacing:4px;gap:12px}.portal-motion{width:36px;height:36px}.account-stage{display:flex;flex-direction:column;align-items:stretch;gap:28px;min-height:0;max-width:440px;margin:auto;padding:30px 0 0}.account-intro{position:relative;top:auto;margin:0;padding:0 4px}.account-intro h1{font-size:33px;line-height:1.4;margin:16px 0 12px}.account-intro>p{font-size:13px;max-width:none}.account-eyebrow{font-size:11px}.account-form-surface{padding:25px 23px;border-radius:18px;max-width:none}.account-portal .account-identity{flex-direction:row;flex-wrap:wrap;gap:3px 14px}.account-portal .form-pair{grid-template-columns:1fr 1fr}.portal-light>img{left:-30%;top:-30px;width:145%;height:470px}.account-portal[data-page=profile] .account-intro h1{font-size:30px}.account-portal[data-page=profile] .account-intro h1 br{display:none}.account-portal[data-page=profile] .account-stage{padding-top:14px;gap:22px}.account-portal[data-page=profile] .account-form-surface{padding:22px}.group-nav-name{max-width:110px}.profile-nav>span:not(.account-avatar){display:none}.group-code{gap:12px}.group-code strong{font-size:16px;letter-spacing:1px}}
@keyframes portal-tab-forward{from{transform:translateX(0)}to{transform:translateX(100%)}}
@keyframes portal-tab-back{from{transform:translateX(100%)}to{transform:translateX(0)}}
.account-portal[data-page=register][data-previous-page=login] .account-tabs:after,.account-portal[data-page=join][data-previous-page=create] .account-tabs:after{animation:portal-tab-forward .28s cubic-bezier(.2,.7,.2,1)}
.account-portal[data-page=login][data-previous-page=register] .account-tabs:after,.account-portal[data-page=create][data-previous-page=join] .account-tabs:after{animation:portal-tab-back .28s cubic-bezier(.2,.7,.2,1)}
.account-form-surface .primary[aria-busy=true]:after{content:"";width:14px;height:14px;border:1px solid currentColor;border-right-color:transparent;border-radius:50%;animation:portal-wait .8s linear infinite}
@keyframes portal-wait{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.account-portal *,.account-portal *:before,.account-portal *:after{animation:none!important;transition:none!important}}

/* Membership stays in the group; the mission has no separate invite controls. */
#modal[data-kind=group]{max-width:820px;background:var(--room-paper,#000)!important}
#modal[data-kind=group] .modal-head{padding:28px 32px 22px;background:var(--room-paper,#000)!important}
#modal[data-kind=group] .modal-head h2{font-size:var(--ui-heading,18px)!important;line-height:1.5}
#modal[data-kind=group] .modal-head p{font-size:13px;color:#9aa8ac;margin-top:8px}
#modal[data-kind=group] .modal-body{padding:0 32px 24px}
#modal[data-kind=group] h3{font-size:14px;font-weight:500;color:#bbc7c9;margin:22px 0 12px}
#modal[data-kind=group] h3>span{margin-left:8px;color:#869397}
.member-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.member-role{font-size:11px;color:#d9c99d}
.group-members article{align-items:flex-start}.member-remove{font-size:12px;color:#d7a9a0;flex-shrink:0;min-height:36px;padding:6px 10px;border-radius:8px;transition:background .2s}.member-remove:hover{background:#c17a6820}
.member-remove-confirm{padding:12px 14px;margin-top:12px;background:#bd80700e;border-left:2px solid #c49687}.member-remove-confirm p{font-size:12px!important;line-height:1.7;margin:0 0 8px;color:#d6c2bb!important}.member-remove-confirm>div{display:flex;gap:16px;justify-content:flex-end}
.group-add{border-top:1px solid #ffffff18;margin-top:24px;padding-top:2px}.group-add>header{display:flex;justify-content:space-between;align-items:baseline;gap:12px}.group-add>header>span{font-size:12px;color:#89979b}
#modal[data-kind=group] .group-member-search input{font-size:14px;padding:12px 14px;outline-offset:2px}
#modal[data-kind=group] #local-member-results article{padding:14px 0;border-color:#ffffff0d}
.directory-person{min-width:0;flex:1}.directory-person strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}.directory-person small{color:#98a5a8;overflow-wrap:anywhere}.member-joined{font-size:12px;color:#a4b8ad;white-space:nowrap}.directory-more{display:block;margin:12px auto}.group-invite{margin-top:24px;color:#aab7ba;font-size:13px}.group-invite .group-code{padding:16px 0;border:0}.group-switch{margin-top:16px}.group-switch button{font-size:13px}
#modal[data-kind=group] button:focus-visible{outline:2px solid #bfc6b3;outline-offset:3px}
@media(max-width:600px){#modal[data-kind=group] .modal-head{padding:22px 22px 16px}#modal[data-kind=group] .modal-body{padding:0 22px 22px}#modal[data-kind=group] .modal-head h2{font-size:var(--ui-heading,18px)!important}.group-members article{gap:10px}.group-members .account-avatar{width:30px;height:30px}.group-member-search button{font-size:13px;padding:8px 14px}}

/* One identity, reused in the gate, garden and conversation. */
.has-avatar{position:relative;overflow:hidden;isolation:isolate}.has-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}.has-avatar>span{line-height:1}
.avatar-editor{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:24px}.avatar-upload{position:relative;display:flex!important;align-items:center;gap:14px;cursor:pointer;margin:0!important;color:#decc9f!important;font-size:13px!important}.avatar-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.avatar-upload .account-avatar{width:64px;height:64px;font-size:24px;box-shadow:0 0 0 1px #e0ce9b38,0 0 28px #d1b87712}.avatar-editor small{flex-basis:100%;color:#8d9ea6;font-size:11px}.avatar-editor .text-button{font-size:12px}
.account-choice{text-align:center}.account-choice h2{font-size:25px;font-weight:450;margin:16px 0 30px;color:#ece6d6}.login-avatar-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:16px;max-height:320px;overflow:auto;padding:10px 3px}.login-avatar{display:flex;flex-direction:column;align-items:center;gap:10px;border:0;background:transparent;color:#e0e6df;padding:12px 4px;border-radius:14px;min-width:0;transition:background .2s,transform .2s}.login-avatar .account-avatar{width:66px;height:66px;font-size:24px;background:linear-gradient(140deg,#344647,#222d37);box-shadow:0 0 0 1px #e4d2a32e,0 8px 24px #0003;transition:box-shadow .25s,transform .25s}.login-avatar:hover{background:#ffffff04;transform:translateY(-3px)}.login-avatar:hover .account-avatar{box-shadow:0 0 0 1px #e4d2a38a,0 0 32px #dbbd7330;transform:scale(1.05)}.login-avatar:active{transform:scale(.97)}.login-avatar strong{font-size:14px;font-weight:450;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.login-avatar small{font-size:11px;color:#8a9ca3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.choice-alternatives{border-top:1px solid #bfcbd414;padding-top:16px;margin-top:12px}.choice-alternatives>.text-button{font-size:13px;margin:14px 8px 0;color:#b4c0c5}.device-login-note{font-size:11px!important;color:#81959e!important;margin:24px 0 0!important}.choice-back{font-size:12px;color:#c8ba95;margin-bottom:20px}.account-choice .account-error:empty{display:none}
.garden-partners{gap:10px!important}.partner-name{padding:6px!important;border:0;background:none!important}.partner-name .account-avatar{width:42px;height:42px;font-size:15px;border:1px solid #dfd4ae30;box-shadow:0 6px 20px #0002;transition:transform .25s,box-shadow .25s}.partner-name:hover .account-avatar,.partner-name:focus-visible .account-avatar{transform:translateY(-4px);box-shadow:0 0 22px #c9ad6d30;border-color:#dcc7918a}.partner-add{width:42px;height:42px!important}
@media(max-width:760px){.login-avatar .account-avatar{width:56px;height:56px}.account-choice h2{font-size:22px}.partner-name .account-avatar{width:36px;height:36px}.avatar-editor{gap:12px}}
