.profile-wrap { position:relative; display:flex; align-items:stretch; gap:6px; margin-top:15px; }
.profile-wrap .profile { width:auto; flex:1; margin-top:0; }
.profile-more,.library-profile-more { width:31px; min-width:31px; color:#7c857a; border:0; border-radius:5px; background:#f0f2ed; font-weight:800; letter-spacing:1px; }
.profile-more:hover,.library-profile-more:hover { color:#3e4b3a; background:#e4edd7; }
.account-popover,.library-account-popover { position:absolute; right:0; bottom:calc(100% + 9px); z-index:20; width:216px; padding:13px; color:#364034; border:1px solid #dce2d7; border-radius:6px; background:#fff; box-shadow:0 12px 30px rgba(36,47,33,.14); }
.account-popover>p,.library-account-popover>p { margin:0 0 10px; color:#98a28f; font:9px "DM Mono",monospace; letter-spacing:.8px; }
.account-popover>div,.library-account-popover>div { display:flex; justify-content:space-between; align-items:center; padding:9px 10px; border-radius:4px; background:#f6f8f3; }
.account-popover>div+div,.library-account-popover>div+div { margin-top:7px; }
.account-popover span,.library-account-popover span { color:#899388; font-size:10px; }
.account-popover strong,.library-account-popover strong { color:#435937; font-size:11px; }
.account-popover>a,.library-account-popover>a{min-height:34px;display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding:0 10px;color:#415039;border:1px solid #dce6d2;border-radius:4px;background:#f3f8ea;font-size:10px;font-weight:700}.account-popover>a:after,.library-account-popover>a:after{content:"→";font-size:14px}
.account-popover .account-menu-item,.library-account-popover .account-menu-item{width:100%;min-height:34px;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;margin-top:8px;padding:0 11px;color:#687462;border:1px solid #dfe3dc;border-radius:3px;background:#fff;font:600 10px inherit;text-decoration:none;cursor:pointer;box-shadow:none}.account-popover .account-menu-item:first-of-type,.library-account-popover .account-menu-item:first-of-type{margin-top:0}.account-popover .account-menu-item:hover,.library-account-popover .account-menu-item:hover{color:#3f5236;background:#eff3e9;border-color:#cbd9b8}.account-popover .account-menu-item:after,.library-account-popover .account-menu-item:after{content:none!important}.account-popover .account-menu-item span,.library-account-popover .account-menu-item span{display:none}.account-popover .account-menu-logout,.library-account-popover .account-menu-logout{color:#687462;border-color:#dfe3dc;background:#fff;text-align:left}.account-popover .account-menu-logout:hover,.library-account-popover .account-menu-logout:hover{color:#3f5236;background:#eff3e9;border-color:#cbd9b8}.library-account{width:100%;box-sizing:border-box;border:0;font:inherit;text-align:left;cursor:pointer}.library-account>span:last-child{margin-left:0}
.library-account-wrap { position:relative; display:flex; align-items:stretch; gap:6px; }
.library-account-wrap .library-account { flex:1; }
.library-account-popover { bottom:calc(100% + 8px); }
@media(max-width:760px){.profile-wrap,.library-account-wrap{display:none}}
.account-menu-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px}.account-menu-modal.hidden{display:none}.account-menu-modal-backdrop{position:absolute;inset:0;background:rgba(20,29,20,.36);backdrop-filter:blur(3px)}.account-menu-dialog{position:relative;width:min(460px,calc(100vw - 32px));max-height:min(680px,calc(100vh - 32px));overflow:auto;border:1px solid #dce2d7;border-radius:10px;background:#fff;box-shadow:0 22px 70px rgba(22,35,22,.22);color:#364034}.account-menu-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;padding:20px 22px 14px;border-bottom:1px solid #edf0eb}.account-menu-kicker{margin:0 0 6px;color:#98a28f;font:9px "DM Mono",monospace;letter-spacing:.9px}.account-menu-dialog h2{margin:0;color:#2f3f2c;font-size:20px}.account-menu-close{width:28px;height:28px;border:1px solid #dfe3dc;border-radius:50%;background:#fff;color:#687462;font-size:20px;line-height:1;cursor:pointer}.account-menu-close:hover{background:#eff3e9}.account-menu-modal-body{padding:20px 22px 22px;font-size:13px;line-height:1.7}.account-menu-loading,.account-menu-empty,.account-menu-error{margin:8px 0;color:#7d8878}.account-menu-error{color:#a04949}.account-menu-detail-grid{display:grid;grid-template-columns:96px 1fr;gap:10px 14px;padding:14px;border:1px solid #e5ebe1;border-radius:7px;background:#f8faf7}.account-menu-detail-grid span{color:#899388}.account-menu-detail-grid strong{color:#40533b;word-break:break-all}.account-menu-capabilities{margin-top:14px;padding:14px;border:1px solid #e5ebe1;border-radius:7px}.account-menu-capabilities small{color:#899388}.account-menu-capabilities p{margin:6px 0 0;color:#40533b}.account-menu-support{padding:16px;border:1px solid #e5ebe1;border-radius:7px;background:#f8faf7}.account-menu-support p{margin:0 0 10px}.account-menu-support-link{display:inline-flex;margin-top:8px;padding:8px 13px;border:1px solid #d4dfc8;border-radius:4px;background:#eef5e8;color:#40533b;text-decoration:none;font-weight:700}.account-menu-ledger{display:grid;gap:8px}.account-menu-ledger article{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e5ebe1;border-radius:6px;background:#f8faf7}.account-menu-ledger article span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-menu-ledger b.plus{color:#4d7b47}.account-menu-ledger b.minus{color:#a05b55}.account-menu-confirm p{margin:0 0 18px}.account-menu-confirm>div{display:flex;justify-content:flex-end;gap:8px}.account-menu-secondary,.account-menu-primary{padding:9px 16px;border:1px solid #dfe3dc;border-radius:4px;background:#fff;color:#687462;font-weight:700;cursor:pointer}.account-menu-primary{border-color:#cbd9b8;background:#eff5e9;color:#3f5236}.account-menu-secondary:hover,.account-menu-primary:hover{filter:brightness(.97)}body.account-menu-modal-open{overflow:hidden}@media(max-width:600px){.account-menu-modal{padding:12px}.account-menu-dialog{width:100%;max-height:calc(100vh - 24px)}}
/* Account menu visual alignment */
.account-popover .account-menu-item,.library-account-popover .account-menu-item{font-size:10px;line-height:1;letter-spacing:0}.account-popover .account-menu-logout,.library-account-popover .account-menu-logout{margin-top:12px;color:#4b5f40;border-color:#b9caa9;background:#edf5e8;font-size:10px;font-weight:600}.account-popover .account-menu-logout:hover,.library-account-popover .account-menu-logout:hover{color:#30442a;border-color:#9eb88e;background:#e1eed9}
dialog.account-menu-dialog:not([open]){display:none}dialog.account-menu-dialog{position:fixed;inset:0;margin:auto;width:min(460px,calc(100vw - 32px));height:max-content;max-height:min(680px,calc(100vh - 32px));padding:0;overflow:auto;border:1px solid #dce2d7;border-radius:10px;background:#fff;box-shadow:0 22px 70px rgba(22,35,22,.22)}dialog.account-menu-dialog::backdrop{background:rgba(20,29,20,.42);backdrop-filter:blur(3px)}dialog.account-menu-dialog .account-menu-modal-body{padding:20px 22px 22px}@media(max-width:600px){dialog.account-menu-dialog{width:calc(100vw - 24px);max-height:calc(100vh - 24px)}}
.account-menu-billing-summary{margin-top:14px;padding:14px;border:1px solid #e5ebe1;border-radius:7px;background:#f8faf7}.account-menu-billing-summary small,.account-menu-recharge-hint{color:#899388}.account-menu-billing-summary p{margin:6px 0 0;color:#40533b}.account-menu-recharge-hint{margin-top:0!important}.account-menu-recharge-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.account-menu-recharge-presets span{padding:9px 10px;border:1px solid #e5ebe1;border-radius:5px;background:#fff;color:#40533b;font-size:12px}.account-menu-ledger article>div{display:flex;min-width:0;flex:1;flex-direction:column}.account-menu-ledger article small{margin-top:2px;color:#899388;font-size:10px}.account-menu-ledger article em{flex:0 0 auto;color:#899388;font-size:10px;font-style:normal}.account-menu-ledger article b{flex:0 0 auto}@media(max-width:600px){.account-menu-recharge-presets{grid-template-columns:1fr}.account-menu-ledger article{align-items:flex-start;flex-wrap:wrap}.account-menu-ledger article em{width:100%;padding-left:0}}
dialog.account-menu-dialog>header{position:relative;display:block;min-height:76px;box-sizing:border-box;padding:24px 68px 16px 22px}
dialog.account-menu-dialog>header>div{min-width:0}
dialog.account-menu-dialog>header h2{max-width:100%;overflow-wrap:anywhere;line-height:1.3}
dialog.account-menu-dialog .account-menu-close{position:absolute;top:14px;right:14px;z-index:2;display:grid;place-items:center;width:30px;height:30px;padding:0}
@media(max-width:600px){dialog.account-menu-dialog>header{padding-right:62px;padding-left:18px}dialog.account-menu-dialog .account-menu-close{top:12px;right:12px}}
