
.bb-account-module--account-account-options,
.bb-account-module[data-bb-account-route^="manage-account"] {
    --bb-surface: rgba(127,127,127,.07);
    --bb-surface-strong: rgba(127,127,127,.12);
    --bb-line: rgba(127,127,127,.18);
    --bb-shadow: 0 18px 50px rgba(0,0,0,.07);
}

.bb-account-hub,
.bb-manage-account,
.bb-manage-shell {
    width: min(100% - 32px, 980px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.bb-manage-shell { width: 100%; }




.bb-eyebrow { display: inline-block; margin-bottom: 10px; color: var(--link); text-transform: uppercase; }

.bb-account-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.bb-account-option-card,
.bb-address-grid a,
.bb-stat-grid a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border:0;
    border-radius: 20px;
    background: var(--bb-surface);
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.bb-account-option-card:hover,
.bb-address-grid a:hover,
.bb-stat-grid a:hover { transform: translateY(-1px); background: var(--bb-surface-strong); }
.bb-account-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    background: var(--white);
    border:0;
}
.bb-account-option-icon svg { width: 22px; height: 22px; }
.bb-account-option-copy { min-width: 0; display: grid; gap: 4px; }
.bb-account-option-copy small { color: var(--text-secondary); }
.bb-account-option-arrow { margin-left: auto; color: var(--text-secondary); transform: scale(1.35); transform-origin: center; }








.bb-manage-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.bb-manage-nav {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border:0;
    border-radius: 18px;
    background: var(--bb-surface);
}
.bb-manage-nav a {
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text-primary) !important;
    text-decoration: none !important;
}
.bb-manage-nav a:hover,
.bb-manage-nav a.is-active { background: var(--white); box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.bb-manage-main { min-width: 0; }

.bb-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 24px; }
.bb-stat-grid a { flex-direction: column; align-items: flex-start; gap: 5px; padding: 16px; border-radius: 16px; }
.bb-stat-grid span { color: var(--text-secondary); }

.bb-manage-panel,
.bb-manage-form,
.bb-order-card,
.bb-download-card,
.bb-profile-editor,
.bb-empty {
    border:0;
    border-radius: 20px;
    background: var(--bb-surface);
    padding: 22px;
    box-sizing: border-box;
}
.bb-manage-panel h2 { margin: 0 0 16px; }
.bb-manage-panel--compact { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 16px; }
.bb-detail-list { margin: 0; }
.bb-detail-list > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 16px; padding: 12px 0; border-top:0; }
.bb-detail-list > div:first-child { border-top: 0; }
.bb-detail-list dt { color: var(--text-secondary); }
.bb-detail-list dd { margin: 0; overflow-wrap: anywhere; }

.bb-manage-list { display: grid; gap: 12px; }
.bb-order-top,
.bb-order-meta,
.bb-order-items > div,
.bb-download-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.bb-order-top > div:first-child { display: grid; gap: 3px; }
.bb-order-top span,
.bb-order-meta,
.bb-download-card span { color: var(--text-secondary); }
.bb-order-total { white-space: nowrap; }
.bb-order-meta { justify-content: flex-start; margin: 12px 0; flex-wrap: wrap; }
.bb-order-card details { border-top:0; padding-top: 12px; }
.bb-order-card summary { cursor: pointer; }
.bb-order-items { display: grid; gap: 8px; margin-top: 12px; }
.bb-order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bb-order-actions a,
.bb-download-card > a,
.bb-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 10px;
    background: var(--button-bg);
    color: #fff !important;
    text-decoration: none !important;
}

.bb-address-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bb-address-grid a { align-items: flex-start; flex-direction: column; }
.bb-address-grid span { color: var(--text-secondary); }

.bb-manage-form { display: grid; gap: 14px; }
.bb-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.bb-manage-form label { display: grid; gap: 7px; color: var(--text-secondary); }
.bb-manage-form input,
.bb-manage-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--input-text);
    padding: 13px 14px;
    font: inherit;
    resize: vertical;
}
.bb-manage-form input:focus,
.bb-manage-form textarea:focus { outline: none; border-color: var(--input-focus); box-shadow: 0 0 0 4px var(--input-focus-shadow); }
.bb-manage-form button,
.bb-profile-actions button,
.bb-file-button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    background: var(--button-bg);
    color: #fff;
    padding: 12px 16px;
    cursor: pointer;
    justify-self: start;
}
.bb-button-secondary { background: var(--bb-surface-strong) !important; color: var(--text-primary) !important; border:0 !important; }
.bb-span-2 { grid-column: 1 / -1; }


.bb-switch-form label { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 0; border-bottom:0; }
.bb-switch-form label > span { display: grid; gap: 3px; color: var(--text-primary); }
.bb-switch-form small { color: var(--text-secondary); }
.bb-switch-form input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 22px; }

.bb-manage-notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; }
.bb-manage-notice--success { background: rgba(0,136,90,.12); color: #08764f; }
.bb-manage-notice--error { background: rgba(244,68,85,.12); color: var(--error-red); }
.bb-manage-auth { width: min(100% - 32px, 460px); margin: 0 auto; text-align: center; }

.bb-profile-progress { display:grid; gap:10px; margin:0 0 18px; padding:16px 18px; border:0; border-radius:16px; background:var(--bb-surface); }
.bb-profile-progress > div:first-child { display:flex; justify-content:space-between; gap:12px; }
.bb-profile-progress span { color:var(--text-secondary); }
.bb-progress-track { height:6px; overflow:hidden; border-radius:999px; background:var(--bb-surface-strong); }
.bb-progress-track i { display:block; height:100%; border-radius:inherit; background:var(--button-bg); }
.bb-profile-position-form { width:100%; display:grid !important; grid-template-columns:1fr; gap:10px !important; padding-top:8px; border-top:0; }
.bb-profile-position-form label { display:grid !important; grid-template-columns:140px minmax(0,1fr); align-items:center; gap:12px !important; }
.bb-profile-position-form input[type="range"] { width:100%; }

@media (max-width: 820px) {
    .bb-manage-shell { grid-template-columns: 1fr; gap: 18px; }
    .bb-manage-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; white-space: nowrap; margin-inline: -16px; padding: 8px 16px; border: 0; border-radius: 0; background: transparent; }
    .bb-manage-nav::-webkit-scrollbar { display: none; }
    .bb-manage-nav a { background: var(--bb-surface); border:0; }
    .bb-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
    .bb-account-option-grid,
    .bb-address-grid,
    .bb-form-grid { grid-template-columns: 1fr; }
    .bb-span-2 { grid-column: auto; }
    
    
    
    
    .bb-detail-list > div { grid-template-columns: 1fr; gap: 4px; }
    .bb-order-top { align-items: flex-start; }
}

/* v2.2.3 compact account UI */
.bb-account-module--account-account-options,
.bb-account-module[data-bb-account-route^="manage-account"] {
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}
.bb-account-module--account-account-options .bb-account-shared-logo,
.bb-account-module[data-bb-account-route^="manage-account"] .bb-account-shared-logo {
    max-width: 100%;
}
.bb-account-hub,
.bb-manage-account {
    width: min(980px, calc(100vw - 32px));
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}
.bb-account-option-grid,
.bb-account-option-card,
.bb-account-option-copy,
.bb-manage-main,
.bb-manage-panel,
.bb-manage-form,
.bb-order-card,
.bb-download-card { min-width: 0; box-sizing: border-box; }
.bb-account-option-copy small,
.bb-account-option-copy strong,
.bb-manage-account strong,
.bb-account-hub strong { font-weight: 400; }
.bb-manage-account button,
.bb-manage-account input,
.bb-manage-account textarea,
.bb-manage-account select,
.bb-manage-account a,
.bb-manage-account summary,
.bb-account-hub a { font-weight: 400; }



.bb-manage-shell { grid-template-columns: 188px minmax(0,1fr); gap: 18px; }
.bb-manage-nav { gap: 2px; padding: 6px; border-radius: 14px; }
.bb-manage-nav a { padding: 8px 10px; border-radius: 9px; }


.bb-account-option-grid { gap: 8px; }
.bb-account-option-card { gap: 10px; padding: 12px; border-radius: 14px; }
.bb-account-option-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
.bb-account-option-icon svg { width: 18px; height: 18px; }
.bb-manage-panel,
.bb-manage-form,
.bb-order-card,
.bb-download-card,
.bb-empty { padding: 14px; border-radius: 14px; }

.bb-stat-grid { gap: 8px; margin-bottom: 14px; }
.bb-stat-grid a { padding: 12px; border-radius: 12px; }
.bb-form-grid { gap: 10px; }
.bb-manage-form { gap: 10px; }
.bb-manage-form label { gap: 5px; }
.bb-manage-form input,
.bb-manage-form textarea {
    padding: 10px 11px;
    border-radius: 10px;
}
.bb-manage-form input[readonly] { opacity: .72; cursor: default; }
.bb-manage-form button,
.bb-file-button,
.bb-primary-link {
    padding: 9px 12px;
    border-radius: 10px;
}
.bb-form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.bb-form-actions a { color:var(--link); text-decoration:none; }
.bb-manage-more-options { margin-top: 10px; }
.bb-manage-more-options summary { cursor:pointer; list-style:none; }
.bb-manage-more-options summary::-webkit-details-marker { display:none; }
.bb-manage-inline-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; margin-top:12px; }
.bb-manage-inline-form label { display:grid; gap:5px; }
.bb-manage-inline-form input { width:100%; box-sizing:border-box; padding:10px 11px; border:1px solid var(--input-border); border-radius:10px; background:var(--input-bg); color:var(--input-text); }
.bb-manage-inline-form button { border:0; border-radius:10px; padding:10px 12px; background:var(--button-bg); color:#fff; cursor:pointer; }

/* Replaces the old bb-profile-editor button wall. */
.bb-profile-editor { display:none !important; }
.bb-avatar-manager { border:0; border-radius:16px; background:var(--bb-surface); padding:14px; }
.bb-avatar-manager__top { display:grid; grid-template-columns:88px minmax(0,1fr); gap:14px; align-items:center; }
.bb-avatar-manager__preview { all:unset; width:88px; height:88px; border-radius:50%; overflow:hidden; position:relative; cursor:pointer; background:var(--bb-surface-strong); display:block; }
.bb-avatar-manager__image { width:100%; height:100%; object-fit:cover; display:block; }
.bb-avatar-manager__change { position:absolute; inset:auto 0 0; padding:6px 4px; text-align:center; background:rgba(0,0,0,.55); color:#fff; opacity:0; transition:opacity .18s ease; }
.bb-avatar-manager__preview:hover .bb-avatar-manager__change,
.bb-avatar-manager__preview:focus-visible .bb-avatar-manager__change { opacity:1; }
.bb-avatar-manager__summary { min-width:0; }
.bb-avatar-manager__summary p { margin:4px 0 10px; color:var(--text-secondary); }
.bb-avatar-manager__toolbar { display:flex; flex-wrap:wrap; gap:6px; }
.bb-avatar-manager__toolbar button,
.bb-avatar-manager__more button,
.bb-avatar-manager__editorbar button,
.bb-avatar-manager__editor-actions button,
.bb-avatar-camera button { appearance:none; border:0; background:var(--white); color:var(--text-primary); padding:7px 10px; border-radius:9px; cursor:pointer; }
.bb-avatar-manager__save { background:var(--button-bg) !important; color:#fff !important; border-color:transparent !important; }
.bb-avatar-manager__danger { color:var(--error-red) !important; }
.bb-avatar-manager__more { margin-top:10px; padding-top:10px; border-top:0; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.bb-avatar-manager__more[hidden] { display:none; }
.bb-avatar-manager__sound { display:flex; align-items:center; gap:8px; color:var(--text-secondary); }
.bb-avatar-manager__drop { margin-top:10px; padding:10px; border:0; border-radius:10px; text-align:center; color:var(--text-secondary); cursor:pointer; }
.bb-avatar-manager__drop.is-drag { border-color:var(--link); background:var(--bb-surface-strong); }
.bb-avatar-manager__editor { margin-top:12px; padding-top:12px; border-top:0; }
.bb-avatar-manager__editor[hidden] { display:none; }
.bb-avatar-manager__editorbar,
.bb-avatar-manager__editor-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.bb-avatar-manager__editorbar > div,
.bb-avatar-manager__editor-actions { display:flex; gap:6px; }
.bb-avatar-manager__cropbox { height:min(52vw,360px); min-height:240px; margin:10px 0; overflow:hidden; border-radius:12px; background:var(--bb-surface-strong); }
.bb-avatar-manager__cropbox img { display:block; max-width:100%; }
.bb-avatar-manager__message {
    min-height:58px;
    margin-top:10px;
    color:var(--text-secondary);
    display:block;
}
.bb-avatar-manager__message.has-status {
    padding:10px 12px 9px;
    border:0;
    border-radius:12px;
    background:color-mix(in srgb, var(--bb-surface-strong) 82%, transparent);
    box-shadow:0 1px 2px rgba(0,0,0,.025);
}
.bb-avatar-manager__status-line {
    min-height:32px;
    display:grid;
    grid-template-columns:22px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    min-width:0;
}
.bb-avatar-manager__status-icon {
    width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border-radius:50%;
    color:var(--text-secondary);
}
.bb-avatar-manager__status-spinner {
    display:none;
    width:15px;
    height:15px;
    box-sizing:border-box;
    border:2px solid color-mix(in srgb, currentColor 22%, transparent);
    border-top-color:currentColor;
    border-radius:50%;
    animation:bbAvatarStatusSpin .72s linear infinite;
}
.bb-avatar-manager__status-check,
.bb-avatar-manager__status-error { display:none; }
.bb-avatar-manager__status-check {
    width:8px;
    height:5px;
    border-left:2px solid currentColor;
    border-bottom:2px solid currentColor;
    transform:translateY(-1px) rotate(-45deg);
}
.bb-avatar-manager__status-error {
    font-size:13px;
    line-height:1;
    font-weight:600;
}
.bb-avatar-manager__status-copy {
    min-width:0;
    display:grid;
    gap:1px;
}
.bb-avatar-manager__status-text {
    min-width:0;
    color:var(--text-primary);
    line-height:1.35;
}
.bb-avatar-manager__status-detail {
    min-height:0;
    color:var(--text-secondary);
    font-size:12px;
    line-height:1.35;
}
.bb-avatar-manager__status-detail:empty { display:none; }
.bb-avatar-manager__status-percent {
    min-width:36px;
    text-align:right;
    color:var(--text-secondary);
    font-variant-numeric:tabular-nums;
}
.bb-avatar-manager__progress {
    width:100%;
    height:3px;
    margin-top:8px;
    overflow:hidden;
    border-radius:999px;
    background:color-mix(in srgb, var(--bb-line) 88%, transparent);
    opacity:0;
    transition:opacity .18s ease;
}
.bb-avatar-manager__progress-bar {
    display:block;
    width:var(--bb-avatar-progress,0%);
    height:100%;
    border-radius:inherit;
    background:var(--link);
    transition:width .2s cubic-bezier(.25,.1,.25,1), background-color .18s ease;
}
.bb-avatar-manager__message.is-loading .bb-avatar-manager__status-spinner { display:block; }
.bb-avatar-manager__message.is-loading .bb-avatar-manager__progress,
.bb-avatar-manager__message.is-success .bb-avatar-manager__progress { opacity:1; }
.bb-avatar-manager__message.is-indeterminate .bb-avatar-manager__status-percent,
.bb-avatar-manager__message.is-success .bb-avatar-manager__status-percent,
.bb-avatar-manager__message.is-error .bb-avatar-manager__status-percent { display:none; }
.bb-avatar-manager__message.is-indeterminate .bb-avatar-manager__progress-bar {
    width:34%;
    animation:bbAvatarProgressIndeterminate .9s cubic-bezier(.4,0,.2,1) infinite;
}
.bb-avatar-manager__message.is-success .bb-avatar-manager__status-icon {
    background:rgba(52,199,89,.13);
    color:#34c759;
    animation:bbAvatarSuccessPop .32s cubic-bezier(.16,1,.3,1);
}
.bb-avatar-manager__message.is-success .bb-avatar-manager__status-check { display:block; }
.bb-avatar-manager__message.is-success .bb-avatar-manager__progress-bar {
    width:100%;
    background:#34c759;
}
.bb-avatar-manager__message.is-error {
    border-color:rgba(255,59,48,.18);
}
.bb-avatar-manager__message.is-error .bb-avatar-manager__status-icon {
    background:rgba(255,59,48,.12);
    color:#ff3b30;
}
.bb-avatar-manager__message.is-error .bb-avatar-manager__status-error { display:block; }
.bb-avatar-manager__message.is-error .bb-avatar-manager__progress { opacity:0; }
@keyframes bbAvatarStatusSpin { to { transform:rotate(360deg); } }
@keyframes bbAvatarSuccessPop {
    0% { transform:scale(.72); opacity:.2; }
    100% { transform:scale(1); opacity:1; }
}
@keyframes bbAvatarProgressIndeterminate {
    0% { transform:translateX(-120%); }
    100% { transform:translateX(395%); }
}
.bb-avatar-camera { position:fixed; inset:0; z-index:2147483000; background:rgba(0,0,0,.78); display:grid; place-items:center; padding:16px; }
.bb-avatar-camera__card { width:min(680px,100%); background:var(--page-bg); border-radius:16px; padding:12px; }
.bb-avatar-camera video { width:100%; display:block; border-radius:12px; background:#000; }
.bb-avatar-camera__actions { display:flex; justify-content:flex-end; gap:8px; padding-top:10px; }
html.bb-account-modal-lock, html.bb-account-modal-lock body { overflow:hidden !important; }

@media (max-width:820px) {
    .bb-manage-shell { grid-template-columns:1fr; }
    .bb-manage-nav { margin-inline:0; padding:0 0 8px; }
}
@media (max-width:600px) {
    .bb-account-hub,
    .bb-manage-account { width:calc(100vw - 32px); }
    .bb-account-option-grid { grid-template-columns:1fr; }
    
    
    .bb-avatar-manager__top { grid-template-columns:72px minmax(0,1fr); }
    .bb-avatar-manager__preview { width:72px; height:72px; }
    .bb-avatar-manager__drop { display:none; }
    .bb-manage-inline-form { grid-template-columns:1fr; }
}

.bb-manage-nav-separator{height:1px;background:var(--bb-line);margin:4px 6px;}
.bb-avatar-manager__image.is-success{animation:bbAvatarSuccess .7s cubic-bezier(.16,1,.3,1)}
@keyframes bbAvatarSuccess{0%{filter:none}45%{filter:brightness(1.08);box-shadow:0 0 0 12px rgba(41,151,255,.14)}100%{filter:none;box-shadow:none}}
.bb-avatar-flash{position:fixed;inset:0;z-index:2147483640;background:#fff;opacity:0;pointer-events:none}.bb-avatar-flash.is-on{animation:bbAvatarFlash .38s ease-out forwards}@keyframes bbAvatarFlash{0%{opacity:0}18%{opacity:.82}55%{opacity:.22}100%{opacity:0}}

/* v2.2.4 compact shared rings for Account Options and every Manage Account route. */
.bb-account-module--account-account-options .bb-account-shared-logo,
.bb-account-module[data-bb-account-route^="manage-account"] .bb-account-shared-logo {
    --bb-logo-size: 180px;
    --bb-logo-scale: 1;
    --bb-logo-margin-bottom: 22px;
    width: 180px;
    height: 180px;
    margin: 0 auto 22px;
    transform: none;
}
.bb-account-module--account-account-options .bb-account-shared-logo.is-small,
.bb-account-module[data-bb-account-route^="manage-account"] .bb-account-shared-logo.is-small {
    transform: none;
    margin-bottom: 22px;
}

.bb-account-hub-header,
.bb-manage-common-header {
    text-align: center;
    margin-bottom: 18px;
}
.bb-account-hub-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    margin: -14px auto 28px;
    border-radius: 999px;
    background: var(--button-bg);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 400;
}
.bb-account-hub-signin:hover { background: var(--button-bg-hover); }

/* Manage Account stays compact and regular-weight.
   Do not touch the shared .acc-title / .af-subtitle typography. */
.bb-manage-account button,
.bb-manage-account input,
.bb-manage-account textarea,
.bb-manage-account select,
.bb-manage-account a,
.bb-manage-account summary,
.bb-manage-account label,
.bb-manage-account p,
.bb-manage-account dt,
.bb-manage-account dd,
.bb-manage-account .bb-manage-nav,
.bb-manage-account .bb-manage-main {
    font-family: "BB Text", sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: -.016em;
    line-height: 1.42857144;
}
.bb-manage-account strong { font-weight: 400; }
.bb-manage-account.is-loading .bb-manage-main { opacity: .45; pointer-events: none; }
.bb-manage-main { transition: opacity .16s ease; }

@media (max-width: 767px) {
    .bb-account-module--account-account-options .bb-account-shared-logo,
    .bb-account-module[data-bb-account-route^="manage-account"] .bb-account-shared-logo {
        --bb-logo-size: 160px;
        width: 160px;
        height: 160px;
        margin-bottom: 18px;
    }
    .bb-account-module--account-account-options .bb-account-shared-logo.is-small,
    .bb-account-module[data-bb-account-route^="manage-account"] .bb-account-shared-logo.is-small {
        margin-bottom: 18px;
    }
}


/* v2.2.8 true single-page Manage Account panels + local page-style preloader */
.bb-manage-main { position: relative; min-height: 120px; }
.bb-manage-panels { position: relative; min-width: 0; }
.bb-manage-panel-view[hidden] { display: none !important; }
.bb-manage-panel-view.is-active { display: block; }
.bb-manage-main-preloader {
    --bb-manage-pl-spinner: #000;
    position: absolute;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    background: rgba(255,255,255,.90);
    pointer-events: auto;
    overflow: hidden;
    border-radius: inherit;
}
.theme-dark .bb-manage-main-preloader { --bb-manage-pl-spinner:#fff; background:rgba(0,0,0,.90); }
.bb-manage-main-preloader.is-active { display: flex; }
.bb-manage-qxspin { position:absolute; top:40px; left:50%; width:0; height:0; transform:translateX(-50%) scale(.72); transform-origin:center; }
.bb-manage-qxbar { position:absolute; width:10px; height:4px; top:-2px; left:-10px; transform-origin:right center; transform:rotate(calc(var(--i) * -45deg)) translateX(-6px); }
.bb-manage-qxbar::before { content:""; display:block; width:100%; height:100%; background:var(--bb-manage-pl-spinner); border-radius:25% / 50%; animation:bbManageQxFade .8s linear infinite; animation-delay:calc(var(--i) * .1s - .8s); }
@keyframes bbManageQxFade { 0%,1%,100%{opacity:.55} 95%{opacity:.08} }
.bb-manage-main.is-switching .bb-manage-panels { visibility:hidden; }

/* v2.2.16: preserve the original Manage layout; add input-safe nav scrolling only when overflow exists. */
.bb-manage-nav.is-scrollable {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    cursor: grab;
}
.bb-manage-nav.is-scrollable.is-dragging {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
    scroll-behavior: auto;
}
.bb-manage-nav a.f14r {
    cursor: pointer;
    pointer-events: auto;
}

/* v2.2.19: saved avatar is already the exact Cropper square; never re-position/zoom it in UI. */

.bb-avatar-manager.is-avatar-busy .bb-avatar-manager__toolbar button,
.bb-avatar-manager.is-avatar-busy .bb-avatar-manager__more button,
.bb-avatar-manager.is-avatar-busy .bb-avatar-manager__editorbar button,
.bb-avatar-manager.is-avatar-busy .bb-avatar-manager__editor-actions button {
    cursor: wait;
}

/* =========================================================
   v2.4 authoritative Manage Account presentation
   Flat navigation, borderless surfaces, shared controls.
   ========================================================= */
.bb-account-hub,
.bb-manage-account {
    width:min(calc(100% - 32px),980px);
    margin-inline:auto;
    box-sizing:border-box;
}
.bb-manage-common-header {
    display:grid;
    justify-items:center;
    margin:0 auto 28px;
}
.bb-manage-header-avatar {
    appearance:none;
    border:0;
    background:transparent;
    padding:0;
    margin:0 0 14px;
    width:72px;
    height:72px;
    border-radius:50%;
    overflow:hidden;
    cursor:pointer;
}
.bb-manage-header-avatar img {
    width:100%;
    height:100%;
    display:block;
    border-radius:50%;
    object-fit:cover;
    object-position:50% 50%;
}
.bb-manage-shell {
    width:100%;
    display:grid;
    grid-template-columns:210px minmax(0,1fr);
    gap:32px;
    align-items:start;
}
.bb-manage-nav {
    position:sticky;
    top:calc(var(--bb-account-nav-offset,64px) + 16px);
    display:grid;
    gap:2px;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.bb-manage-nav a,
.bb-manage-nav a.f14r {
    position:relative;
    padding:8px 0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    color:var(--text-primary)!important;
    text-decoration:none!important;
}
.bb-manage-nav a:hover { color:var(--link)!important; background:transparent; box-shadow:none; }
.bb-manage-nav a.is-active {
    color:var(--link)!important;
    background:transparent;
    box-shadow:none;
}
.bb-manage-nav a.is-active::after {
    content:"";
    position:absolute;
    left:0;
    right:auto;
    bottom:3px;
    width:24px;
    height:2px;
    border-radius:999px;
    background:currentColor;
}
.bb-manage-nav-separator { height:1px; margin:8px 0; background:color-mix(in srgb,var(--text-secondary) 20%,transparent); }
.bb-manage-main { min-width:0; }
.bb-manage-panel-view[hidden] { display:none!important; }
.bb-manage-panel-heading { margin:0 0 18px; }
.bb-manage-panel-title { color:var(--text-primary); font-weight:400; }
.bb-manage-panel-heading p { margin:4px 0 0; color:var(--text-secondary); }

/* No decorative card borders in Manage Account. */
.bb-manage-account .bb-manage-panel,
.bb-manage-account .bb-manage-form,
.bb-manage-account .bb-order-card,
.bb-manage-account .bb-download-card,
.bb-manage-account .bb-empty,
.bb-manage-account .bb-profile-progress,
.bb-manage-account .bb-account-option-card,
.bb-manage-account .bb-account-option-icon,
.bb-account-hub .bb-account-option-card,
.bb-account-hub .bb-account-option-icon {
    border:0!important;
}
.bb-manage-account .bb-manage-form,
.bb-manage-account .bb-order-card,
.bb-manage-account .bb-download-card,
.bb-manage-account .bb-empty,
.bb-manage-account .bb-profile-progress {
    background:var(--bb-surface);
    border-radius:18px;
    box-shadow:none;
}
.bb-manage-account .bb-manage-form { padding:20px; display:grid; gap:14px; }
.bb-manage-account .bb-order-card,
.bb-manage-account .bb-download-card,
.bb-manage-account .bb-empty { padding:18px; }
.bb-manage-account .bb-profile-progress { padding:16px 18px; }

.bb-profile-progress { display:grid; gap:10px; margin:0 0 16px; }
.bb-profile-progress > div:first-child { display:flex; justify-content:space-between; gap:12px; }
.bb-profile-progress span { color:var(--text-secondary); }
.bb-progress-track { height:6px; overflow:hidden; border-radius:999px; background:var(--bb-surface-strong); }
.bb-progress-track i { display:block; height:100%; border-radius:inherit; background:var(--link); }
.bb-manage-suggestions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 18px; }
.bb-manage-suggestions strong { margin-right:4px; }
.bb-manage-suggestions button,
.bb-author-link-actions button,
.bb-avatar-history-item button,
.bb-manage-secondary-action {
    appearance:none;
    border:0;
    background:transparent;
    color:var(--link);
    padding:0;
    cursor:pointer;
    text-decoration:none;
}
.bb-manage-suggestions button:hover,
.bb-author-link-actions button:hover,
.bb-avatar-history-item button:hover,
.bb-manage-secondary-action:hover { text-decoration:underline; }

.bb-stat-grid,
.bb-store-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 22px; }
.bb-stat-grid button,
.bb-store-grid button,
.bb-store-grid > div {
    appearance:none;
    border:0;
    border-radius:16px;
    background:var(--bb-surface);
    color:var(--text-primary);
    padding:16px;
    display:grid;
    text-align:left;
    gap:4px;
    cursor:pointer;
}
.bb-store-grid > div { cursor:default; }
.bb-stat-grid span,.bb-store-grid span { color:var(--text-secondary); }
.bb-stat-grid strong,.bb-store-grid strong { font-size:17px; }

.bb-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.bb-span-2 { grid-column:1/-1; }
.bb-manage-form label { display:grid; gap:7px; color:var(--text-secondary); }
.bb-manage-form input,
.bb-manage-form textarea,
.bb-manage-form select {
    width:100%;
    box-sizing:border-box;
    border:0;
    outline:0;
    border-radius:12px;
    background:var(--input-bg);
    color:var(--input-text);
    padding:13px 14px;
    font:inherit;
    box-shadow:inset 0 0 0 1px var(--input-border);
}
.bb-manage-form input:focus,
.bb-manage-form textarea:focus,
.bb-manage-form select:focus { box-shadow:inset 0 0 0 1px var(--input-focus),0 0 0 4px var(--input-focus-shadow); }
.bb-manage-form input[readonly] { opacity:.72; cursor:default; }
.bb-form-actions { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.bb-manage-account .bb-account-primary-button--compact { justify-self:start; width:auto; min-width:0; text-align:left; }
.bb-manage-ajax-status { min-height:0; color:var(--text-secondary); }
.bb-manage-ajax-status:empty { display:none; }
.bb-manage-ajax-status.is-success { color:#16834f; }
.bb-manage-ajax-status.is-error { color:var(--error-red); }
.bb-location-readout:empty { display:none; }
.bb-location-readout { color:var(--text-secondary); }

.bb-security-form { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; }
.bb-security-form label:nth-of-type(3) { grid-column:1/-1; }
.bb-security-form .bb-manage-ajax-status { grid-column:1/-1; }
.bb-manage-links { display:flex; flex-wrap:wrap; gap:16px; margin-top:14px; }

.bb-address-tabs { display:flex; gap:18px; margin:0 0 16px; }
.bb-address-tabs button {
    appearance:none;
    border:0;
    box-shadow:none;
    background:transparent;
    color:var(--text-secondary);
    padding:6px 0;
    cursor:pointer;
}
.bb-address-tabs button.is-active { color:var(--link); box-shadow:inset 0 -2px currentColor; }

.bb-switch-form label {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:10px 0;
    border:0;
}
.bb-switch-form label > span { display:grid; gap:3px; color:var(--text-primary); }
.bb-switch-form small { color:var(--text-secondary); }
.bb-switch-form input[type="checkbox"] { width:22px; height:22px; flex:0 0 22px; padding:0; box-shadow:none; }

.bb-author-stats { display:flex; flex-wrap:wrap; gap:18px; margin:0 0 18px; }
.bb-author-stats span { display:inline-flex; gap:5px; color:var(--text-secondary); }
.bb-author-stats strong { color:var(--text-primary); }
.bb-author-link-actions { display:flex; flex-wrap:wrap; gap:14px; }
.bb-manage-subsection { margin-top:26px; }
.bb-manage-list { display:grid; gap:10px; }
.bb-manage-row-link,
.bb-activity-row {
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:flex-start;
    padding:14px 0;
    border:0;
    box-shadow:inset 0 -1px color-mix(in srgb,var(--text-secondary) 16%,transparent);
    color:var(--text-primary)!important;
    text-decoration:none!important;
}
.bb-manage-row-link:last-child,.bb-activity-row:last-child { box-shadow:none; }
.bb-manage-row-link small,.bb-activity-row small { color:var(--text-secondary); }
.bb-activity-row > div { display:grid; gap:3px; min-width:0; }
.bb-activity-row > div:last-child { justify-items:end; text-align:right; }
.bb-activity-row a { color:var(--link); text-decoration:none; }

.bb-chip-list { display:flex; flex-wrap:wrap; gap:8px; }
.bb-chip-list span { padding:6px 10px; border-radius:999px; background:var(--bb-surface); }

.bb-avatar-history { margin-top:28px; }
.bb-avatar-history-grid { display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; }
.bb-avatar-history-item {
    position:relative;
    display:grid;
    grid-template-columns:40px minmax(0,1fr);
    grid-template-areas:"thumb meta" "thumb actions";
    column-gap:8px;
    row-gap:2px;
    width:min(100%,220px);
    min-width:0;
    padding:6px;
    border-radius:10px;
    background:var(--bb-surface);
}
.bb-avatar-history-item.is-current { box-shadow:inset 0 0 0 1px var(--input-focus); }
.bb-avatar-history-thumb {
    grid-area:thumb;
    width:40px!important;
    height:40px!important;
    min-width:40px;
    aspect-ratio:1;
    display:block;
    object-fit:cover;
    border-radius:50%!important;
}
.bb-avatar-history-meta { grid-area:meta; min-width:0; display:grid; gap:1px; color:var(--text-secondary); }
.bb-avatar-history-meta strong { color:var(--text-primary); font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-avatar-history-meta small { color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bb-avatar-history-actions { grid-area:actions; display:flex; flex-wrap:wrap; gap:8px; align-items:center; min-width:0; }
.bb-avatar-history-actions button {
    appearance:none; border:0; padding:0; margin:0; background:transparent; color:var(--link);
    font:inherit; cursor:pointer; text-align:left;
}
.bb-avatar-history-actions button:hover { text-decoration:underline; }
.bb-avatar-history-actions button:focus-visible { outline:2px solid var(--input-focus); outline-offset:3px; border-radius:3px; }
.bb-avatar-history-actions button:disabled { color:var(--text-secondary); cursor:default; text-decoration:none; opacity:.7; }
.bb-avatar-history-state { color:var(--text-secondary); }
.bb-avatar-manager__message[hidden] { display:none!important; }
.bb-avatar-manager__message:not(.has-status) { display:none!important; }

.bb-account-option-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.bb-account-option-card {
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
    padding:16px;
    border:0!important;
    border-radius:18px;
    background:var(--bb-surface);
    color:var(--text-primary)!important;
    text-decoration:none!important;
}
.bb-account-option-card:hover { background:var(--bb-surface-strong); transform:none; }
.bb-account-option-icon { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border:0!important; border-radius:12px; background:var(--white); }
.bb-account-option-icon svg { width:22px; height:22px; }
.bb-account-option-copy { min-width:0; display:grid; gap:3px; }
.bb-account-option-copy small { color:var(--text-secondary); }
.bb-account-option-arrow { margin-left:auto; color:var(--text-secondary); }

.bb-manage-notice { margin-bottom:14px; padding:11px 13px; border:0; border-radius:12px; }
.bb-manage-notice--success { background:rgba(0,136,90,.12); color:#08764f; }
.bb-manage-notice--error { background:rgba(244,68,85,.12); color:var(--error-red); }

@media (max-width:820px) {
    .bb-manage-shell { grid-template-columns:1fr; gap:18px; }
    .bb-manage-nav {
        position:sticky;
        top:var(--bb-account-nav-offset,0px);
        z-index:20;
        display:flex;
        overflow-x:auto;
        gap:16px;
        width:100%;
        padding:8px 0;
        white-space:nowrap;
        scrollbar-width:none;
        background:var(--page-bg,#fff);
        -webkit-overflow-scrolling:touch;
    }
    .theme-dark .bb-manage-nav { background:var(--page-bg,#000); }
    .bb-manage-nav::-webkit-scrollbar { display:none; }
    .bb-manage-nav a,.bb-manage-nav a.f14r { flex:0 0 auto; padding:8px 0; border:0; background:transparent; }
    .bb-manage-nav-separator { flex:0 0 1px; width:1px; height:auto; margin:5px 0; }
    .bb-stat-grid,.bb-store-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
    .bb-form-grid,.bb-account-option-grid { grid-template-columns:1fr; }
    .bb-span-2 { grid-column:auto; }
    .bb-security-form { grid-template-columns:1fr; }
    .bb-security-form label:nth-of-type(3),.bb-security-form .bb-manage-ajax-status { grid-column:auto; }
    .bb-manage-header-avatar { width:64px; height:64px; }
    .bb-activity-row { display:grid; gap:6px; }
    .bb-activity-row > div:last-child { justify-items:start; text-align:left; }
}

/* Manage Account profile trigger: the shared animated rings/avatar are the only header photo button. */
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button {
    pointer-events:auto !important;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    outline:none;
}
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button .bb-account-shared-logo-mark {
    pointer-events:none;
}
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button .bb-account-shared-profile-image {
    pointer-events:none;
    box-shadow:none;
}
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button:hover .bb-account-shared-profile-image,
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button:focus-visible .bb-account-shared-profile-image {
    box-shadow:0 0 0 2px var(--link, #008888), 0 0 0 5px color-mix(in srgb, var(--link, #008888) 18%, transparent);
}
.bb-account-module[data-bb-account-route^="manage-account"] > .bb-account-shared-logo.is-manage-profile-button:active .bb-account-shared-profile-image {
    box-shadow:0 0 0 2px var(--button-bg-hover, #009595), 0 0 0 5px color-mix(in srgb, var(--button-bg-hover, #009595) 18%, transparent);
}

/* All manage-account interactive states follow the account theme color. */
.bb-manage-account :is(a,button,input,select,textarea):focus-visible,
.bb-avatar-camera :is(button,input):focus-visible {
    outline:2px solid var(--input-focus, var(--link, #008888));
    outline-offset:2px;
}
.bb-avatar-manager__toolbar button:hover,
.bb-avatar-manager__more button:hover,
.bb-avatar-manager__editorbar button:hover,
.bb-avatar-manager__editor-actions button:hover,
.bb-avatar-camera button:hover,
.bb-author-link-actions button:hover {
    color:var(--link, #008888);
}
.bb-avatar-manager__toolbar button:active,
.bb-avatar-manager__more button:active,
.bb-avatar-manager__editorbar button:active,
.bb-avatar-manager__editor-actions button:active,
.bb-avatar-camera button:active,
.bb-author-link-actions button:active {
    color:var(--button-bg-hover, #009595);
}

/* v2.5.3 manage-account state colors: active is normal; hover/focus uses focus color. */
.bb-manage-nav a:hover,
.bb-manage-nav a.f14r:hover {
    color:var(--input-focus, var(--link, #008888))!important;
}
.bb-manage-nav a.is-active,
.bb-manage-nav a.f14r.is-active {
    color:var(--text-primary)!important;
}
.bb-avatar-manager__toolbar button:hover,
.bb-avatar-manager__more button:hover,
.bb-avatar-manager__editorbar button:hover,
.bb-avatar-manager__editor-actions button:hover,
.bb-avatar-camera button:hover,
.bb-author-link-actions button:hover,
.bb-avatar-history-actions button:hover,
.bb-manage-secondary-action:hover {
    color:var(--input-focus, var(--link, #008888));
}
.bb-avatar-manager__toolbar button:active,
.bb-avatar-manager__more button:active,
.bb-avatar-manager__editorbar button:active,
.bb-avatar-manager__editor-actions button:active,
.bb-avatar-camera button:active,
.bb-author-link-actions button:active,
.bb-avatar-history-actions button:active,
.bb-manage-secondary-action:active {
    color:var(--text-primary);
}
