/* Nodora profile: a public overview, with private controls in one account sheet. */
body .app #memberProfile .profile-overview{
 padding:0!important;overflow:hidden;background:var(--panel)!important;background-image:none!important;
 border:1px solid var(--line);box-shadow:none;color:var(--text)!important;
}
body[data-theme="dark"] #memberProfile .profile-overview.has-profile-cover{--text:#f5f7ff;--muted:#91a0c4;--panel:#0f1729;--line:#263554}
body[data-theme="light"] #memberProfile .profile-overview.has-profile-cover{--text:#16233d;--muted:#526582;--panel:#fff;--line:#c2cee4}
.profile-cover-stage{position:relative;isolation:isolate;display:flex;align-items:flex-end;min-height:166px;padding:12px 20px;background:linear-gradient(130deg,#2580ff35,#7a4df235)}
.profile-cover-stage::before{content:'';position:absolute;inset:0;z-index:-1;background:var(--profile-cover,none) center 35%/cover no-repeat;opacity:.8}
.profile-cover-stage::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,var(--panel),transparent 88%)}
.profile-toolbar{position:absolute;right:16px;top:16px;display:flex;gap:8px}
.profile-icon-button{display:grid;place-items:center;box-sizing:border-box;width:36px;height:36px;padding:7px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);cursor:pointer}
.profile-icon-button svg{display:block;width:20px;height:20px}
.profile-avatar-trigger{padding:0;border:0;background:none;cursor:pointer;border-radius:12px}
body .app .profile-overview .profile-avatar-trigger #profileAvatar{width:110px!important;height:146px!important;min-width:110px!important;flex-basis:auto!important;margin:0!important;border-radius:0!important;background-size:contain!important;background-repeat:no-repeat!important;background-position:center!important;overflow:visible!important;box-shadow:none!important;filter:none!important}
.profile-overview-copy{padding:8px 20px 16px}
.profile-name-line{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px}
.profile-name-details{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;min-width:0}
body .app .profile-overview #profileGrowthBadge{display:inline-flex;align-items:center;flex:none;box-sizing:border-box;min-height:32px;margin:0;padding:5px 10px;line-height:20px;white-space:nowrap}
body .app .profile-overview #editProfile{align-self:start;justify-self:end;margin:0!important;white-space:nowrap}

body .app .profile-overview #profileName{margin:0;font-size:24px!important;line-height:30px!important;min-width:0;overflow-wrap:anywhere;color:var(--text)!important}
body .app .profile-overview #editProfile{flex:none;min-height:34px;padding:6px 12px;font-size:12px;background:var(--ui-field);color:var(--text)}
body .app .profile-overview #profileBio{margin:8px 0 0;font-size:13px;line-height:20px;color:var(--muted)!important;overflow-wrap:anywhere}
/* Matching profile shortcuts, with distinct artwork and room for each label. */
.profile-feature-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:420px;margin-top:16px}
body .app #memberProfile .profile-feature-links>button{display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:flex-start!important;gap:8px;width:100%!important;min-width:0;max-width:100%;margin:0!important;background:var(--ui-field)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:none!important;min-height:98px!important;padding:12px!important;font-size:13px!important;line-height:18px!important;font-weight:600!important;white-space:normal!important;text-align:left;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}
body .app #memberProfile .profile-feature-links>.profile-plus-link{background:var(--ui-accent-soft),var(--panel)!important}
.profile-feature-icon{display:grid;place-items:center;width:28px;height:28px;flex:none;color:var(--ui-focus)}
.profile-feature-icon :is(svg,img){display:block;width:24px;height:24px;object-fit:contain}
.profile-feature-icon img{transform:scale(1.45)}
.profile-feature-copy{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:100%}
.profile-feature-copy strong{font:inherit;letter-spacing:-.015em;overflow-wrap:normal}
.profile-feature-copy small{font-size:11px;line-height:16px;font-weight:400;color:var(--muted)}
body .app #memberProfile .profile-feature-links>button:hover{border-color:var(--ui-focus)!important}
body .app #memberProfile .profile-feature-links>button:focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
@media(max-width:350px){body .app #memberProfile .profile-feature-links>button{padding:10px!important;font-size:12px!important}}
.profile-overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);padding:14px 8px}
body .app .profile-overview .profile-overview-stats .stat{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;border:0!important;border-right:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;color:var(--text)!important;padding:0 6px;font:inherit}
body .app .profile-overview .profile-overview-stats .stat:last-child{border-right:0!important}
.profile-overview-stats .stat b{font-size:18px;line-height:24px;font-variant-numeric:tabular-nums}
.profile-overview-stats .stat span{font-size:11px;line-height:17px;color:var(--muted)}
.profile-overview-stats button{cursor:pointer}
.profile-tabs{margin-top:14px;border-bottom:1px solid var(--line)}
.profile-tabs [role=tablist]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.profile-tabs [role=tab]{border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--muted);padding:13px 6px;font:inherit;font-size:13px;font-weight:650;cursor:pointer}
.profile-tabs [role=tab][aria-selected=true]{border-bottom-color:#5264eb;color:var(--text)}
.profile-tab-panel{padding-top:16px}
.profile-posts-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.profile-posts-heading h3{font-size:14px;margin:0}
.profile-text-button{padding:4px 0;border:0;background:none;color:var(--purple);font:inherit;font-size:12px;font-weight:650;cursor:pointer}
.profile-empty-state{padding:40px 20px;text-align:center;border-bottom:1px solid var(--line)}
.profile-empty-state>svg{width:38px;height:38px;margin-bottom:10px;color:var(--purple)}
.profile-empty-state h3{margin:0 0 8px;font-size:19px}
.profile-empty-state p{margin:0 auto 18px;max-width:340px;color:var(--muted);font-size:13px;line-height:20px}
.profile-history-note{font-size:12px;text-align:center;padding:12px}
.profile-about-section{padding:16px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:20px}
.profile-about-section h3{margin:0 0 8px;font-size:14px}
.profile-about-section p{margin:0;color:var(--muted);overflow-wrap:anywhere}
.profile-about-section summary{font-weight:650;cursor:pointer;padding:4px 0}
.profile-about-section .wallet-connection-card{margin-top:12px;padding:14px!important}
.profile-about-votes{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.profile-about-votes .stat{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;min-width:0;padding:12px!important;border-radius:10px;background:var(--ui-field);font-size:12px;color:var(--muted)}
.profile-about-votes .stat b{color:var(--text);font-size:18px}
body .app #profile-panel-achievements #ownAchievements{margin:0!important;background:var(--panel)}
.profile-account-drawer{position:fixed;inset:0;z-index:240;display:flex;align-items:center;justify-content:center;background:#020612a6;padding:20px;box-sizing:border-box}
.profile-account-drawer[hidden]{display:none!important}
.profile-account-sheet{display:flex;flex-direction:column;width:min(560px,100%);max-height:min(820px,calc(100dvh - 40px));min-height:0;overflow:hidden;box-sizing:border-box;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);box-shadow:0 24px 80px #0004}
.profile-sheet-header{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:12px;padding:16px;border-bottom:1px solid var(--line);flex:none}
.profile-sheet-header h2{font-size:18px;line-height:24px;margin:0;text-align:center}
.profile-sheet-header button{position:static!important}
.profile-sheet-header #profileDrawerBack[hidden]{display:block!important;visibility:hidden;pointer-events:none}
.profile-sheet-scroll{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0;padding:8px 16px 20px}
.profile-menu-list{display:flex;flex-direction:column}
#profileAccountDrawer .profile-menu-item{display:flex;align-items:center;gap:12px!important;box-sizing:border-box;width:100%!important;min-height:52px!important;padding:13px 4px!important;margin:0!important;background:transparent!important;color:var(--text)!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;text-align:left;justify-content:flex-start!important;font-family:inherit!important;font-size:14px!important;font-weight:500!important;line-height:22px!important;cursor:pointer}
#profileAccountDrawer .profile-menu-item[hidden]{display:none!important}
.profile-menu-item>svg{width:20px;height:20px;flex:none;color:var(--muted)}
.profile-menu-item>span{flex:1;min-width:0;overflow-wrap:anywhere}
.profile-menu-item>svg:last-child{width:16px;height:16px}
#profileAccountDrawer .profile-menu-item#profileSignOut{color:#d55e78!important}
.profile-settings-section{padding:14px 0;border-bottom:1px solid var(--line)}
.profile-settings-section>h3{margin:0 0 8px;color:var(--muted);font-size:11px!important;line-height:18px;letter-spacing:.06em;text-transform:uppercase;text-align:left}
.profile-settings-section .profile-setting-row{display:flex!important;align-items:center;gap:12px;box-sizing:border-box;min-height:50px;width:100%;padding:11px 2px;margin:0;border:0;border-radius:0;background:none;color:var(--text);font:inherit;font-size:13px;font-weight:500;line-height:20px;text-align:left;cursor:pointer}
.profile-setting-row>span{flex:1;min-width:0}
.profile-setting-row>svg{flex:none;width:20px;height:20px;color:var(--muted)}
.profile-setting-row>svg:last-child{width:16px;height:16px}
.profile-setting-row input[type=checkbox]{appearance:none;position:relative;flex:none;width:36px!important;height:22px!important;border:1px solid var(--line);border-radius:99px!important;background:var(--ui-field);cursor:pointer}
.profile-setting-row input[type=checkbox]::before{content:'';position:absolute;width:16px;height:16px;left:2px;top:2px;background:var(--muted);border-radius:50%;transition:transform .15s ease}
.profile-setting-row input[type=checkbox]:checked{background:#5264eb;border-color:#5264eb}
.profile-setting-row input[type=checkbox]:checked::before{background:#fff;transform:translateX(14px)}
.profile-settings-section .username-credit-note{padding:0 2px;margin:4px 0 0;font-size:11px;line-height:17px;color:var(--muted);text-align:left}
.profile-settings-section .profile-delete-account{color:#d55e78!important}
.profile-settings-section .legal-links{margin:0;padding:0;border:0;font-size:12px;line-height:20px}
.profile-settings-section .legal-links a{color:var(--purple);text-decoration:none}
body[data-theme="light"] .profile-settings-section .profile-delete-account{color:#b52848!important}
.profile-account-drawer #profileSettingsStatus{font-size:12px;line-height:18px;color:var(--muted)}
.profile-account-drawer :is(.btn,.chip){white-space:normal;line-height:20px}
body:has(#profileAccountDrawer:not([hidden])){overflow:hidden}
body:has(#profileAccountDrawer:not([hidden])) #bottomNav{visibility:hidden!important;pointer-events:none!important}
.profile-public-posts{margin-top:20px}
.profile-public-posts>h3{font-size:15px;margin:0 0 12px}
.profile-account-drawer :is(button,a,input):focus-visible,.profile-overview :is(button,a):focus-visible,.profile-tabs button:focus-visible{outline:2px solid var(--ui-focus);outline-offset:2px}
#socialDialog .plus-membership-hero{padding:26px 20px;border-radius:16px;background:var(--ui-accent);color:#fff;text-align:center}
#socialDialog .plus-membership-hero h2{color:#fff!important;font-size:28px;line-height:36px;margin:12px 0}
#socialDialog .plus-membership-hero p{color:#eef1ff}
.plus-membership-price{display:flex;align-items:center;justify-content:center;gap:6px 8px;flex-wrap:wrap}
.plus-currency-price{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.plus-membership-price .bits-icon{width:18px!important;height:18px!important;flex:0 0 18px;object-fit:contain;transform:none}
#socialDialog .plus-membership .plus-benefit{padding:18px 4px;border-bottom:1px solid var(--line);margin:0}
#socialDialog .plus-membership .plus-benefit h3{font-size:15px;line-height:22px}
#socialDialog .plus-membership .plus-benefit p{font-size:12px;line-height:19px;color:var(--muted)}
#socialDialog .plus-membership #buyPlus{width:100%;min-height:44px}
@media(max-width:760px){
 .profile-cover-stage{padding-inline:16px;min-height:154px}
 .profile-overview-copy{padding-inline:16px}
 body .app .profile-overview #profileName{font-size:22px!important;line-height:28px!important}
 .profile-account-drawer{align-items:flex-end;padding:12px 8px max(8px,env(safe-area-inset-bottom))}
 .profile-account-sheet{max-height:calc(100dvh - 24px - env(safe-area-inset-top));border-radius:20px;box-shadow:0 16px 56px #0004}
 .profile-sheet-scroll{padding-bottom:max(20px,env(safe-area-inset-bottom))}
 .profile-sheet-header{padding:14px}
}
@media(prefers-reduced-motion:reduce){.profile-setting-row input[type=checkbox]::before{transition:none}}
#publicProfilePage .nodora-profile{border:1px solid var(--line);border-radius:14px;padding:18px}
#publicProfilePage .public-profile-identity{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
body #publicProfilePage .cosmetics-profile-avatar{width:110px!important;height:146px!important;min-width:110px!important;flex:none!important}
#publicProfilePage .public-profile-name h3{font-size:22px;line-height:28px;margin:0}
#publicProfilePage .nodora-profile>p{font-size:13px;line-height:20px}
.profile-public-connections{display:flex;gap:20px;margin-top:16px;color:var(--muted);font-size:12px}
.profile-public-connections b{color:var(--text);margin-right:4px}

/* Preserve the NFT card's inner space when it moves into About. */
body .app #memberProfile .profile-nft-section{padding:16px!important;margin-top:16px!important;min-width:0;box-sizing:border-box}
.profile-nft-section>.row{align-items:flex-start;flex-wrap:wrap;gap:12px}
.profile-nft-section>.row>div{flex:1 1 180px;min-width:0}
body .app #memberProfile .profile-nft-section h3{font-size:16px!important;line-height:22px!important;margin:0 0 5px!important}
.profile-nft-section :is(.small,.muted){font-size:12px;line-height:18px;overflow-wrap:anywhere}
body .app #memberProfile .profile-nft-section #addNft{flex:none;width:auto!important;min-height:36px!important;white-space:nowrap;padding:7px 12px!important;border-radius:10px!important;font-size:12px!important;line-height:20px!important;margin:0!important}
.profile-nft-section .showcase{min-width:0}
.profile-nft-section .showcase>p{grid-column:1/-1;min-width:0;max-width:100%;margin:0;overflow-wrap:anywhere}
.profile-nft-section .nft-tile{min-width:0}
.profile-nft-section .nft-tile b{overflow-wrap:anywhere}

/* Let the avatar editor use the sheet's width without a second frame. */
body #socialDialog.avatar-customiser-dialog .card.modal-card{border:0!important;background:var(--bg)!important;padding:14px 0 0!important}
body #socialDialog.avatar-customiser-dialog #socialDialogTitle{padding:0 56px 0 16px!important;margin:0 0 12px!important}
body #socialDialog.avatar-customiser-dialog #socialDialogBody{padding:0!important}
body #socialDialog.avatar-customiser-dialog #avatarColourEditor{border:0!important;border-radius:0!important;background:var(--bg)!important}
@media(max-width:1099px){body #socialDialog.avatar-customiser-dialog:not([hidden]){padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom))!important}}

/* Scoped to windows opened from My Account; other page dialogs keep their layout. */
:root{--account-window-safe-bottom:env(safe-area-inset-bottom,0px)}
body :is(#profileAccountDrawer,#socialDialog.bounded-dialog,#accountModal.bounded-dialog:has(#signedIn)) :is(.card.modal-card,.profile-account-sheet).account-window-card{
 position:fixed!important;inset:auto!important;top:var(--account-window-top)!important;left:var(--account-window-left)!important;
 width:var(--account-window-width)!important;max-width:var(--account-window-width)!important;height:auto!important;
 max-height:var(--account-window-height)!important;margin:0!important;transform:none!important;box-sizing:border-box!important;
 display:flex!important;flex-direction:column;min-height:0;overflow:hidden!important;transform-origin:center;
}
body :is(#socialDialog,#accountModal:has(#signedIn)).bounded-dialog:not([hidden]){inset:0!important;top:0!important;height:100%!important;padding:0!important;pointer-events:auto!important;z-index:241}
body #socialDialog.bounded-dialog #socialDialogTitle{flex:none;min-height:32px;margin:0 0 12px!important;padding-right:48px}
body #socialDialog.bounded-dialog #socialDialogBody,body #accountModal.bounded-dialog :is(#signedIn,#signedOut){min-height:0;overflow:auto!important;overscroll-behavior:contain;flex:1;-webkit-overflow-scrolling:touch}
body #socialDialog.bounded-dialog #socialDialogStatus{flex:none;margin:8px 0 0}
body #socialDialog.bounded-dialog #closeSocialDialog,body #accountModal.bounded-dialog #closeAccount{position:absolute!important;top:10px!important;right:10px!important;width:36px!important;height:36px!important;margin:0!important;z-index:3}
body #socialDialog.bounded-dialog .card.modal-card.account-window-card:has(#avatarColourEditor){height:var(--account-window-height)!important}
body:has(.bounded-dialog:not([hidden])) #bottomNav{visibility:hidden!important;pointer-events:none!important}

body #accountModal.bounded-dialog #signedOut{padding:36px 0 0}
/* Auth fields scroll above a mobile keyboard; submit buttons never cover them. */
body #accountModal.bounded-dialog #signedOut input{font-size:16px!important;scroll-margin-block:12px}
body #accountModal.bounded-dialog :is(#passwordSignup,#passwordLogin){position:static!important}body #accountModal.bounded-dialog :is(#passwordSignup,#passwordLogin).auth-loading{position:relative!important}
body #accountModal.auth-keyboard-open #signedOut>:is(.auth-logo,h2,p,.social-auth,.auth-divider){display:none!important}
body #accountModal.auth-keyboard-open #signedOut{scroll-padding-block:12px}
body #accountModal.auth-keyboard-open .auth-tabs{margin:0 44px 6px 0;padding:3px}
body #accountModal.auth-keyboard-open .auth-tab{min-height:40px;padding:6px 4px;font-size:13px;line-height:20px;white-space:nowrap}
body #accountModal.auth-keyboard-open #signupCredentials>.auth-field:first-child{margin-top:0!important}
body #accountModal.auth-keyboard-open #signupError:empty{display:none}
body #accountModal.auth-keyboard-open #signedOut{padding-top:8px}
body #accountModal.username-step #signedOut>:is(.auth-logo,h2,p,.auth-tabs,.social-auth,.auth-divider){display:none!important}
body #accountModal.username-step #signedOut{padding-top:12px}
body #accountModal #signupIdentity h2{margin:0 36px 8px 0}
body #accountModal.auth-keyboard-open :is(.password-note,#signupIdentity>p){display:none!important}
body #socialDialog.bounded-dialog .expanded-post-image{max-height:calc(var(--account-window-height) - 100px)!important}

/* Connection lists use the same compact avatar treatment as posts. */
#socialDialogBody .connection-identity{display:flex;align-items:center;gap:10px;flex:1 1 160px;min-width:0;text-align:left}
#socialDialogBody .connection-name{min-width:0;overflow-wrap:anywhere}
#socialDialogBody .connection-avatar{display:grid;place-items:center;--connection-avatar-size:var(--ui-post-avatar-size,36px);width:var(--connection-avatar-size)!important;height:var(--connection-avatar-size)!important;min-width:var(--connection-avatar-size)!important;flex:0 0 var(--connection-avatar-size)!important;padding:0;box-sizing:border-box;overflow:hidden}
#socialDialogBody .connection-avatar img{display:block;width:100%;height:100%;object-fit:cover}
#socialDialogBody .connection-actions{flex:none;margin-left:auto;justify-content:flex-end}
body[data-home-layout="compact"] #socialDialogBody .connection-avatar{--connection-avatar-size:var(--ui-compact-post-avatar-size,48px)}

@media(min-width:1100px){
 .profile-name-line{grid-template-columns:minmax(0,1fr)}
 body .app .profile-overview .profile-toolbar #editProfile{height:36px!important;min-height:36px!important;padding:7px 12px!important}
}
.calendar-import-card{padding:16px;margin:14px 0;border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}.calendar-import-card h3{margin:6px 0}.calendar-import-card .row{flex-wrap:wrap;gap:8px;margin-top:14px}.calendar-import-card p{color:var(--muted)}

/* The avatar workshop uses its own width and one internal scrolling catalogue. */
body #socialDialog.avatar-customiser-dialog.bounded-dialog #socialDialogBody{display:flex;flex-direction:column;overflow:hidden!important;min-height:0}
body #socialDialog.avatar-customiser-dialog.bounded-dialog #avatarColourEditor{flex:1;width:100%;height:100%!important;min-height:0}

/* The voxel portrait has a little more transparent space above its face. */
body #accountBtn #headerAvatar{align-self:center;transform:translateY(-2px)}
