:root{--account-purple:#5a31c5;--account-ink:#12101d;--account-muted:#746f82;--account-line:#dedbe6;--account-soft:#f7f5fa}
:root[data-theme="dark"]{--account-purple:#b898f0;--account-ink:#f1eef8;--account-muted:#a79fb5;--account-line:#3a3247;--account-soft:#241f33}
:root[data-theme="dark"] .account-gate{background:var(--surface)}
html:has(.account-gate:not([hidden])),body:has(.account-gate:not([hidden])){height:100%;overflow:hidden}.account-gate{height:100dvh;min-height:0;overflow:hidden;display:grid;grid-template-columns:minmax(300px,1fr) minmax(420px,620px);gap:clamp(36px,7vw,130px);align-items:center;padding:clamp(20px,5vh,64px) clamp(24px,6vw,86px);background:radial-gradient(circle at 17% 45%,#eee7ff 0,transparent 32%),linear-gradient(135deg,#faf9fc,#f3f0f8);color:var(--account-ink)}
.account-brand{display:flex;align-items:center;gap:28px;justify-self:center}.account-logo-frame{width:clamp(110px,12vw,190px);aspect-ratio:1;display:grid;place-items:center}.account-logo-frame img{width:100%;height:100%;object-fit:contain}.account-brand div{display:grid;gap:8px}.account-brand strong{font-size:clamp(34px,4vw,64px);line-height:.98;letter-spacing:-.045em}.account-brand span{font-size:clamp(16px,1.3vw,22px);color:var(--account-muted)}
.account-card{width:100%;max-height:calc(100dvh - 32px);background:var(--card);border:1px solid var(--account-line);border-radius:24px;padding:clamp(24px,3.5vh,44px);box-shadow:0 22px 70px rgba(49,33,84,.11)}.account-card h1{font-size:clamp(30px,4vh,38px);margin:7px 0 8px}.account-card>p{color:var(--account-muted);margin:0 0 clamp(16px,2.5vh,26px);font-size:16px}.account-form{display:grid;gap:clamp(12px,1.8vh,18px)}.account-form label,.profile-form>label,.password-form label{display:grid;gap:7px;font-weight:750;color:#383241}.account-form input,.profile-form input,.password-form input{height:clamp(46px,6vh,52px);border:1px solid #d8d3e1;border-radius:12px;padding:0 15px;font:inherit;color:var(--account-ink);background:var(--card)}.account-form input:focus,.profile-form input:focus,.password-form input:focus{outline:3px solid #e9e0ff;border-color:var(--account-purple)}.account-form .primary-action{height:clamp(48px,6vh,54px);margin-top:2px}.account-form>small{color:var(--account-muted);line-height:1.4}.account-gate-links{display:flex;justify-content:center;gap:8px;margin-top:clamp(14px,2vh,20px);padding-top:clamp(12px,1.8vh,18px);border-top:1px solid #ece9f0}.account-gate-links button{border:0;background:none;color:var(--account-purple);font:inherit;font-weight:750;padding:7px 9px;cursor:pointer}.account-gate-links button[aria-current=true]{display:none}.account-error{border:1px solid #e7a9b2;background:#fff3f5;color:#8c1730;border-radius:11px;padding:10px 12px;margin:0 0 14px;font-weight:650}.offline-account-notice{display:grid;gap:3px;margin-top:16px;border:1px solid #e0c967;background:#fffae4;border-radius:11px;padding:11px 13px}.offline-account-notice span{font-size:13px;color:#6f622a;line-height:1.4}
.account-area{grid-column:3;position:relative;justify-self:end;min-width:0}.account-menu-button{max-width:360px;display:flex;align-items:center;gap:12px;border:1px solid transparent;border-radius:14px;background:transparent;padding:7px 9px 7px 14px;cursor:pointer;color:var(--account-ink)}.account-menu-button:hover,.account-menu-button[aria-expanded=true]{background:var(--card-muted);border-color:#e3deea}.account-header-copy{min-width:0;display:grid;text-align:right;gap:2px}.account-header-copy strong,.account-header-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-header-copy strong{font-size:14px}.account-header-copy small{font-size:12px;color:var(--account-muted)}.header-sync{display:inline-flex;align-items:center;gap:6px;color:var(--account-muted);font-size:12px;font-weight:700;white-space:nowrap}.header-sync i{width:8px;height:8px;border-radius:50%;background:#a9a5af}.header-sync.synced{color:#167b5c}.header-sync.synced i{background:#20a879}.header-sync.offline{color:#9a6414}.header-sync.offline i{background:#d68b1c}.header-sync.connecting i{background:#8b7caf}.account-avatar,.profile-avatar{display:grid;place-items:center;overflow:hidden;border-radius:50%;background:var(--purple-soft);color:var(--account-purple);font-weight:850;letter-spacing:.02em}.account-avatar{flex:0 0 44px;width:44px;height:44px}.profile-avatar{width:92px;height:92px;font-size:26px}.account-avatar img,.profile-avatar img{width:100%;height:100%;object-fit:cover}.account-menu{position:absolute;z-index:80;right:0;top:calc(100% + 8px);width:210px;padding:8px;background:var(--card);border:1px solid var(--account-line);border-radius:14px;box-shadow:0 15px 40px rgba(29,20,45,.16)}.account-menu button{width:100%;border:0;background:none;border-radius:9px;padding:11px 12px;text-align:left;font:inherit;font-weight:700;cursor:pointer}.account-menu button:hover{background:var(--purple-soft)}.account-menu button:last-child{color:#a2273e}
.account-modal{z-index:120}.profile-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 36px);overflow:auto;position:relative;background:var(--card);border-radius:22px;padding:36px;box-shadow:0 24px 80px rgba(22,14,38,.25)}.profile-dialog h2{font-size:30px;margin:8px 0}.profile-dialog>p{color:var(--account-muted);margin:0 0 26px}.profile-form{display:grid;grid-template-columns:1fr 1fr;gap:18px}.profile-photo-editor{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:18px;background:var(--account-soft);border-radius:16px}.file-button,.profile-photo-editor button,.saved-signature-editor button,.password-form button{border:1px solid #d8d3e1;border-radius:10px;background:var(--card);padding:10px 13px;font:inherit;font-weight:750;cursor:pointer}.file-button input{position:absolute;opacity:0;pointer-events:none}.profile-photo-editor button{color:#9d2640}.saved-signature-editor{grid-column:1/-1;display:grid;gap:11px;border-top:1px solid var(--account-line);padding-top:20px}.saved-signature-editor>div{display:grid;gap:3px}.saved-signature-editor small{color:var(--account-muted)}.saved-signature-editor canvas{width:100%;height:150px;border:1px solid #d6d1dd;border-radius:12px;background:var(--card);touch-action:none}.profile-form>.primary-action{grid-column:1/-1;justify-self:end;min-width:170px}
#feedbackForm{grid-template-columns:1fr}#feedbackForm textarea{width:100%;max-width:100%;box-sizing:border-box;resize:vertical}.password-form{display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:end;margin-top:28px;padding-top:22px;border-top:1px solid var(--account-line)}.password-form h3{grid-column:1/-1;margin:0}.password-form button{height:52px;color:var(--account-purple)}
@media(max-width:900px){.account-gate{grid-template-columns:1fr;padding:16px;gap:0}.account-brand{display:none}.account-card{width:min(620px,100%);justify-self:center}.account-area{grid-column:2}.profile-form{grid-template-columns:1fr}.profile-form>*{grid-column:1!important}.password-form{grid-template-columns:1fr}.password-form>*{grid-column:1!important}}
@media(max-width:600px){.account-gate{padding:14px}.account-brand{gap:12px;padding:8px}.account-card{padding:25px 20px;border-radius:18px}.account-header-copy{display:none}.profile-dialog{padding:28px 18px}.profile-photo-editor{flex-wrap:wrap}}
.account-menu-button{padding-right:0}
.profile-connection{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:-10px 0 24px;padding:11px 14px;border:1px solid var(--account-line);border-radius:12px;background:var(--card-muted);color:var(--account-muted);font-size:13px;font-weight:750}
