#account-controls {position:relative;align-self:center;flex:none;z-index:50}
#account-controls[hidden],#account-menu[hidden] {display:none}
#account-toggle {display:flex;align-items:center;gap:8px;min-height:42px;color:#edf3ff;background:#1b2941;border:1px solid #53627d;padding:9px 12px;border-radius:10px;font-weight:600}
#account-toggle:hover,#account-toggle[aria-expanded="true"] {background:#2a3c59}
#account-toggle svg {width:20px;height:20px;flex:none}
#account-menu {position:absolute;right:0;top:calc(100% + 8px);width:230px;max-width:calc(100vw - 24px);padding:6px;background:#fff;color:#23324b;border:1px solid #ccd4df;border-radius:12px;box-shadow:0 16px 45px #0005;text-align:left}
#account-menu button {display:block;width:100%;padding:12px 14px;border:0;border-radius:7px;background:#fff;color:#23324b;font-size:14px;font-weight:600;text-align:left;white-space:normal}
#account-menu button:hover,#account-menu button:focus-visible {background:#edf2ff;color:#223e91}
#account-menu #account-logout {border-top:1px solid #e2e7ee;border-radius:0 0 7px 7px;color:#475467;font-weight:400}
#account-plan-dialog {box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:24px;background:#fff;color:#1d2939;color-scheme:light;border:1px solid #cdd5df;border-radius:18px;box-shadow:0 24px 90px #0007;text-shadow:none}
#account-plan-dialog::backdrop {background:#080f20a6;backdrop-filter:blur(3px)}
.account-dialog-top {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:4px;position:sticky;top:0;z-index:2;background:#fff}
#account-plan-dialog .eyebrow {color:#475b7a;font-size:11px;letter-spacing:.12em}
#account-plan-close {width:40px;min-height:40px;padding:8px;border:1px solid #cdd5df;border-radius:10px;background:#f0f3f8;color:#25334a;font-size:18px;line-height:1}
#account-panel {margin:0;padding:0;border:0;background:transparent;color:#1d2939}
#account-panel h2 {font-size:24px;color:#15233b;margin:6px 0 20px;line-height:1.4}
#account-panel p {color:#344054;line-height:1.7;margin:12px 0;font-size:14px;opacity:1}
#account-panel .muted {color:#475467;font-size:12px;opacity:1}
#account-panel #account-usage {padding:14px 16px;background:#eef3ff;color:#1f3a82;border:1px solid #d4dff7;border-radius:12px;font-weight:700;font-size:16px}
#account-panel #account-contract {padding:12px 14px;background:#f1f4f8;color:#344054;border-radius:10px;font-size:13px}
#account-panel button {max-width:100%;margin:4px 0;min-height:42px;color:#24334b;background:#f4f6fa;border:1px solid #cad3df;font-weight:600}
#account-panel button.primary {color:#fff;background:#294bc0;border-color:#294bc0;box-shadow:none}
#account-panel button:disabled {opacity:1;color:#475467;background:#e9eef5;border-color:#cbd4df;cursor:not-allowed}
.account-actions {display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
#account-panel .account-actions button {margin:0}
.header-short-label {display:none}
.account-details {margin:16px 0;border-top:1px solid #dce2eb;padding-top:12px}
.account-details summary {color:#344054;font-size:13px;cursor:pointer;font-weight:600}
.account-links {display:flex;flex-wrap:wrap;gap:8px 16px;margin:18px 0;font-size:12px;line-height:1.7}
#account-panel .account-links a {color:#304ca8;text-decoration:underline;text-underline-offset:3px}
#account-panel #account-message {font-size:13px;color:#344054;overflow-wrap:anywhere}
#account-plan-done {display:block;width:100%;min-height:44px;margin-top:16px;border:1px solid #c5cedd;background:#f1f4f9;color:#26354e;font-weight:600}
#account-plan-dialog :focus-visible,#account-menu :focus-visible {outline:3px solid #557ee0;outline-offset:3px}
#google-error {font-size:13px;overflow-wrap:anywhere}
#google-dialog {max-width:min(420px,90vw)}
#google-signin {min-height:44px;margin:20px 0}
#purchase-dialog {box-sizing:border-box;width:min(580px,94vw);max-height:90vh;overflow:auto;border:1px solid #ccd5e0;border-radius:18px;padding:24px;background:#fff;color:#253247;color-scheme:light}
#purchase-dialog h2,#purchase-dialog p,#purchase-dialog li {color:#253247}
#purchase-dialog .muted {color:#475467;opacity:1}
#purchase-dialog a {color:#304ca8;text-decoration:underline}
#purchase-dialog::backdrop {background:#151c2e99}
#purchase-dialog li {margin:10px 0;line-height:1.6}
.purchase-ack {display:flex;align-items:flex-start;gap:10px;line-height:1.5;margin:20px 0}
.purchase-ack input {width:auto;margin-top:4px}
.purchase-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px}
@media(max-width:680px){
 .header-full-label {display:none}
 .header-short-label {display:inline}
 .topbar #help,.topbar #end-session,.topbar #export {white-space:nowrap}
 #account-toggle {width:42px;min-height:42px;justify-content:center;padding:9px}
 #account-toggle .account-label,#account-toggle .account-chevron {display:none}
 #account-menu {width:220px}
 #account-plan-dialog {width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:18px;border-radius:14px}
 #account-panel h2 {font-size:22px}
 .account-actions {display:grid;grid-template-columns:1fr}
 #account-panel button {width:100%}
}
@media(max-width:380px){.topbar .brand-type{display:none}}
