body{margin:0;background:#101314;color:#e7e8e5;font:16px system-ui,Arial,sans-serif}*{box-sizing:border-box}.profile-nav{display:flex;gap:24px;padding:18px max(20px,calc((100% - 950px)/2));background:#191e20}.profile-nav a{color:#d7c49b;text-decoration:none}.profile-wrap{max-width:950px;margin:24px auto;padding:0 15px}.banner{height:210px;background:#303d41;border-radius:14px;position:relative;background-position:center;background-size:cover}.image-button{cursor:pointer;background:#2a3437;border:1px solid #667478;border-radius:8px;padding:8px 12px;color:white;font-size:13px}.banner .image-button{position:absolute;bottom:14px;right:14px}.identity{display:flex;align-items:center;gap:18px;margin-top:-40px;position:relative;flex-wrap:wrap}.identity h1{margin:0}.identity p{margin:4px 0;color:#abb7b7}.avatar{height:100px;width:100px;border-radius:50%;border:3px solid #566568;background:#171c1d;display:grid;place-items:center;font-size:35px;background-position:center;background-size:cover;flex-shrink:0}.avatar.gold{border-color:#d8b45d}.avatar.silver{border-color:#c4d2dc}.avatar.forest{border-color:#5b9a77}#about{margin:24px 0;white-space:pre-wrap}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}.stats>div{padding:17px 10px;background:#1b2224;border-radius:12px;text-align:center}.stats strong{display:block;font-size:23px}.stats small{color:#9ba9a9}.tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #374246;padding-bottom:10px}.tabs button,button{cursor:pointer;background:#263135;color:#e7e8e5;border:1px solid #526267;padding:9px 14px;border-radius:8px}.tabs button.active{background:#546e65}.panel{padding:20px 0;min-height:100px}.panel[hidden]{display:none}.panel a{color:#d8bd85}.panel input,.panel textarea,.panel select{display:block;width:100%;max-width:500px;margin:6px 0 14px;background:#202a2d;border:1px solid #637477;color:#fff;padding:11px;border-radius:8px}.panel label{display:block}.entry{background:#1c2527;border-radius:10px;padding:14px;margin:10px 0}.entry small{color:#aebaba}#msg{color:#e4b36b}.owner-only[hidden]{display:none!important}@media(max-width:600px){.stats{grid-template-columns:repeat(2,1fr)}.banner{height:145px}.identity{margin-top:-30px}.avatar{height:80px;width:80px}}
/* Профиль: карточки и косметика */
.banner{background-color:#59405b}.identity h1{overflow-wrap:anywhere}.avatar{position:relative;isolation:isolate}.avatar.has-frame{border-color:transparent!important}.avatar.has-frame::after{content:'';position:absolute;inset:-9px;background-image:var(--frame-url);background-position:center;background-size:100% 100%;pointer-events:none;z-index:2}.work-card{display:flex;gap:16px;align-items:flex-start;background:#1c2527;border-radius:12px;padding:14px;margin:12px 0}.work-cover{width:82px;height:116px;object-fit:cover;border-radius:7px;background:#31343a;flex-shrink:0}.work-cover.placeholder{display:grid;place-items:center;font-size:30px}.work-info{min-width:0}.work-info p{margin:6px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.profile-details{color:#adb8ba}.cosmetic-preview{min-height:40px;padding:10px;border:1px solid #526267;border-radius:8px;margin:0 0 14px;max-width:500px}.privacy-options{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0 15px}.privacy-options label,.panel label.inline-check{display:flex;align-items:center;gap:8px}.privacy-options input,.panel .inline-check input{width:auto;margin:0}.panel input[type=color]{height:46px;padding:5px}.panel input[type=checkbox]{accent-color:#a97490}.library-note{color:#abb7b7}.image-button{z-index:3}@media(max-width:600px){.work-cover{width:64px;height:92px}.work-card{gap:10px}}

/* v12 unified profile */
body{background:#17111d;color:#eee2ec}.profile-nav{background:#1b1522;border-bottom:1px solid #413047}.profile-wrap{max-width:1180px;margin:18px auto}.banner{height:165px;border-radius:14px;background-position:var(--banner-x,50%) var(--banner-y,50%);background-size:cover;background-repeat:no-repeat}.identity{margin-top:-56px;align-items:flex-end;padding-left:16px;gap:16px;z-index:2}.avatar{width:110px;height:110px;border:4px solid #d3a46b;box-shadow:0 4px 14px #0009}.identity>div:nth-child(2){padding-bottom:7px}.identity h1{font-size:25px}.stats{gap:8px;margin:12px 0}.stats>div{padding:10px 8px;background:#241b2b}.stats strong{font-size:18px}.stats small{font-size:11px}.tabs button,button{background:#302239;border-color:#4c3553}.tabs button.active{background:#a85d7f}.work-card{padding:9px 11px;margin:7px 0;background:#251c2c;gap:12px}.work-cover{width:58px;height:82px}.work-info p{font-size:12px;line-height:1.4;margin:4px 0;-webkit-line-clamp:2}.work-info strong{font-size:15px}.entry{background:#261c2d}.panel input,.panel textarea,.panel select{background:#1b1422;border-color:#49334f}.banner-position-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:500px}.banner-position-controls input{width:100%;margin:4px 0 10px}.chat-layout{display:grid;grid-template-columns:minmax(190px,260px) 1fr;gap:14px;min-height:350px}.chat-threads{border-right:1px solid #4c3553;padding-right:10px}.chat-threads button{display:block;width:100%;margin:5px 0;text-align:left}.chat-threads button.active{border-color:#c08caa;background:#4b304f}.chat-messages{max-height:440px;min-height:200px;overflow:auto;padding:10px;background:#1b1522;border-radius:10px}.chat-bubble{max-width:83%;margin:8px 0;padding:9px 12px;border-radius:12px;background:#30253a;overflow-wrap:anywhere}.chat-bubble.mine{margin-left:auto;background:#634057}.chat-bubble small{display:block;opacity:.65;font-size:10px;margin-bottom:4px}.chat-compose{display:flex;gap:8px;margin-top:8px;align-items:end}.chat-compose textarea{flex:1;min-height:54px;margin:0}.chat-compose button{height:44px}@media(max-width:650px){.banner{height:125px}.identity{margin-top:-42px}.avatar{width:82px;height:82px}.chat-layout{grid-template-columns:1fr}.chat-threads{border-right:0;border-bottom:1px solid #4c3553;max-height:130px;overflow:auto}.banner-position-controls{grid-template-columns:1fr}}

.banner-crop-dialog{background:#211728;color:#f4e7f1;border:1px solid #70526f;border-radius:14px;width:min(860px,95vw);max-height:94vh;box-shadow:0 15px 70px #000b}.banner-crop-dialog::backdrop{background:#000b}.banner-crop-dialog h2{margin:0 0 8px}.banner-crop-dialog label{display:block;margin:10px 0}.banner-crop-dialog input[type=range]{width:100%}.banner-crop-viewport{width:100%;aspect-ratio:5/1;overflow:hidden;position:relative;background:#392d3c;border-radius:10px;touch-action:none;cursor:grab}.banner-crop-viewport img{position:absolute;max-width:none;pointer-events:none;user-select:none}.crop-actions{display:flex;gap:10px;margin-top:14px}.banner{background-position:var(--banner-x,50%) var(--banner-y,50%)}

.profile-edit-link{margin-left:auto;align-self:flex-start;padding:9px 13px;border-radius:10px;background:#35253b;color:#f1c9df;text-decoration:none}

/* Public profile: editor controls exist for legacy scripts, but never appear here. */
.profile-wrap>.banner>.image-button,.profile-wrap>.identity>.image-button{display:none!important}
.profile-wrap>.identity{display:flex!important;flex-direction:row!important;align-items:flex-end!important;justify-content:flex-start!important;gap:16px!important;margin-top:-55px!important;padding-left:18px!important;position:relative!important}
.profile-wrap>.identity>.avatar{order:0!important;flex:0 0 110px!important;z-index:4!important}
.profile-wrap>.identity>div:not(.avatar){order:1!important;flex:1!important;padding-bottom:5px!important}
.profile-wrap>.identity>.profile-edit-link{order:3!important;margin-left:auto!important;align-self:center!important;font-size:20px!important}
.profile-wrap .tabs>a{display:none!important}
/* In embedded settings mode, keep editor working without exposing duplicate public profile. */
body.settings-editor .profile-wrap>.banner,body.settings-editor .profile-wrap>.identity,body.settings-editor .profile-wrap>.stats,body.settings-editor .profile-wrap>.tabs,body.settings-editor .profile-wrap>#books,body.settings-editor .profile-wrap>#library,body.settings-editor .profile-wrap>#about,body.settings-editor .profile-wrap>#publicDetails,body.settings-editor #bookspace-global-header{display:none!important}
body.settings-editor .profile-wrap{margin:0 auto!important;padding:0!important;max-width:none!important}
body.settings-editor #settings{display:block!important}
body.settings-editor #settings h2{display:none!important}

/* Privacy fields are edited in the dedicated privacy settings module. Keep hidden inputs for legacy save compatibility. */
body.settings-editor #profileForm>label:has(#handle),body.settings-editor #profileForm>label:has(#birthday),body.settings-editor #profileForm>label:has(#country),body.settings-editor #profileForm>.privacy-options,body.settings-editor #profileForm>label:has(#showCountry),body.settings-editor #profileForm>label:has(#showLibrary){display:none!important}

body.settings-editor .profile-wrap>.banner,body.settings-editor .profile-wrap>.identity{display:block!important}
body.settings-editor .profile-wrap>.banner{height:190px!important;margin-bottom:85px!important}
body.settings-editor .profile-wrap>.identity{position:relative!important;min-height:95px!important}
body.settings-editor .profile-wrap>.identity .avatar{position:absolute!important;left:12px!important;top:-110px!important}
body.settings-editor .profile-wrap>.identity>div:not(.avatar){display:none!important}
body.settings-editor .profile-wrap>.identity .profile-edit-link{display:none!important}

.profile-media-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.profile-media-actions .image-button{display:inline-flex;align-items:center}
.profile-media-actions input[type=file][hidden]{display:none!important}
.work-draft-label{display:block;margin-top:4px;color:#d9ad72}.work-edit-link{display:inline-block;margin-top:8px;color:#e7a9ca;font-size:13px;font-weight:600}

@media(max-width:650px){
  .profile-wrap{margin:10px auto!important;padding:0 10px!important}
  .profile-wrap>.banner{height:125px!important;border-radius:12px}
  .profile-wrap>.identity{display:grid!important;grid-template-columns:82px minmax(0,1fr) 38px;align-items:end!important;gap:10px!important;margin-top:-40px!important;padding-left:8px!important}
  .profile-wrap>.identity>.avatar{width:82px!important;height:82px!important;flex:0 0 82px!important}
  .profile-wrap>.identity>div:not(.avatar){min-width:0!important;padding-bottom:4px!important}
  .profile-wrap>.identity h1{font-size:20px!important;line-height:1.12!important;overflow-wrap:anywhere}
  .profile-wrap>.identity p{font-size:13px;line-height:1.3}
  .profile-wrap>.identity .profile-edit-link{width:38px;height:38px;padding:0!important;display:grid;place-items:center;align-self:end!important;font-size:18px!important}
  .profile-wrap .stats{gap:8px;margin:12px 0}
  .profile-wrap .stats>div{padding:9px 6px}
  .profile-wrap .stats strong{font-size:17px}
  .profile-wrap .profile-follow{gap:8px;margin:8px 0 14px;flex-wrap:wrap}
}
.profile-library-reviews { margin-top: 30px; }
.profile-library-reviews h2 { margin-bottom: 14px; }
.profile-review-card { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 15px; margin: 12px 0; padding: 14px; border: 1px solid var(--ln); border-radius: 14px; background: var(--site-card); }
.profile-review-cover { width: 86px; aspect-ratio: 2/3; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: var(--ui); color: var(--ac); text-decoration: none; }
.profile-review-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-review-card h3 { margin: 4px 0; }
.profile-review-card h3 a { color: var(--fg); }
.profile-review-stars { color: var(--gold); }
.profile-review-blurb { color: color-mix(in srgb,var(--fg) 65%,transparent); }
@media(max-width:520px) { .profile-review-card { grid-template-columns: 64px minmax(0,1fr); gap: 10px; padding: 10px; } .profile-review-cover { width: 64px; } }
.profile-achievement-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;margin:16px 0}.profile-achievement{display:flex;align-items:flex-start;gap:12px;background:var(--ui);border:1px solid var(--ln);border-radius:12px;padding:15px}.profile-achievement .award-symbol{font-size:33px;min-width:40px}.profile-achievement p{margin:4px 0 8px;opacity:.8}.profile-achievement small{display:block;font-size:12px;opacity:.65;margin-top:3px}.achievement-visibility{display:flex;align-items:center;gap:8px}.achievement-visibility input{width:auto}
/* Readable profile identity over light, detailed or animated banners. */
.profile-wrap>.identity>div:not(.avatar):not(.profile-level-badge){background:color-mix(in srgb,var(--ui,#211827) 84%,transparent);border:1px solid color-mix(in srgb,var(--ln,#877084) 70%,transparent);border-radius:13px;padding:9px 13px 10px!important;box-shadow:0 5px 20px #0004;backdrop-filter:blur(8px);max-width:min(610px,calc(100% - 132px))}
.profile-wrap>.identity #nick{font-weight:600;opacity:1!important}
.profile-level-badge{position:absolute;z-index:7;left:-14px;top:65px;min-width:39px;height:39px;border-radius:50%;display:grid;place-items:center;background:#181120;border:2px solid #efc578;color:#f5d896;font-weight:800;font-size:13px;box-shadow:0 2px 8px #000b}
.profile-exp{max-width:245px;margin-top:6px;display:grid;gap:4px}.profile-exp>span{height:5px;background:#edc576;border-radius:6px;position:relative}.profile-exp:before{content:'';display:block;position:absolute}.profile-exp small{font-size:11px;color:var(--fg,#fff);opacity:.95;text-shadow:0 1px 3px #000}
body.settings-editor .profile-level-badge,body.settings-editor .profile-exp{display:none!important}
@media(max-width:650px){.profile-level-badge{left:-7px;top:42px;min-width:32px;height:32px;font-size:11px}.profile-wrap>.identity>div:not(.avatar):not(.profile-level-badge){min-width:0;max-width:100%;padding:7px 9px!important}.profile-wrap>.identity h1{font-size:19px!important}}
/* Suppress old layout rule that stretches badge as identity content */
.profile-wrap>.identity>.profile-level-badge{flex:none!important;padding:0!important;order:0!important}
/* 0.32: compact name plaque, optional backdrop, purchased frames and friend action. */
.profile-wrap>.identity>div:not(.avatar):not(.profile-level-badge){background:transparent!important;box-shadow:none!important;border:0!important;width:auto!important;max-width:calc(100% - 140px);padding:0!important;flex:0 1 auto!important;min-width:0!important;align-self:center}
.profile-wrap>.identity #title.profile-name-no-plate{border-color:transparent!important;background:transparent!important;backdrop-filter:none;padding:0 2px!important}
.profile-wrap>.identity #nick{display:table;width:max-content;max-width:100%;background:#17121dbb;border-radius:6px;padding:2px 7px;color:var(--fg,#f6e8f6)!important;text-shadow:0 1px 2px #000,1px 0 1px #000}
.profile-wrap>.identity .profile-friend-add{display:table;margin:5px 0 3px;padding:6px 10px;border-radius:8px;border:1px solid #aa789e;background:var(--ui,#31233a);color:var(--fg,#f8e9f3);font-size:12px}.profile-friend-add[hidden]{display:none!important}
.profile-wrap>.identity .avatar.has-shop-frame::before{content:'';position:absolute;inset:-13px;z-index:7;pointer-events:none;background-image:var(--shop-avatar-frame);background-size:100% 100%;background-position:center;background-repeat:no-repeat}
.profile-wrap>.banner.has-shop-frame::after{content:'';pointer-events:none;position:absolute;inset:-4px;z-index:2;background-image:var(--shop-banner-frame);background-position:center;background-size:100% 100%;background-repeat:no-repeat}
.review-comment-author,.book-comment-heading{display:flex;align-items:center;gap:9px}.comment-author-avatar{height:34px;width:34px;min-width:34px;display:inline-grid;place-items:center;border-radius:50%;background:var(--ui,#453344);color:var(--fg,#f8e4f2);text-decoration:none;overflow:hidden;border:1px solid var(--ln,#82627e)}.comment-author-avatar img{width:100%;height:100%;object-fit:cover}.book-comment-card{border-bottom:1px solid var(--ln,#5a4859);padding:12px 8px}.book-comment-heading small{display:block;opacity:.7;font-size:11px}.book-comment-actions{display:flex;gap:6px;flex-wrap:wrap}.book-comment-actions button{padding:5px 8px;font-size:12px}
@media(max-width:650px){.profile-wrap>.identity>div:not(.avatar):not(.profile-level-badge){max-width:calc(100% - 110px)!important}.profile-wrap>.identity #title{padding:5px 8px!important;font-size:18px!important}}

.profile-wrap>.identity #title.profile-name-no-plate + #nick{background:transparent!important;padding-left:2px!important;padding-right:2px!important}

/* 0.32.1 profile header cleanup: name, handle and XP under banner; lighter layout without the old heavy plaque. */
.profile-wrap>.identity{
  display:grid!important;
  grid-template-columns:110px minmax(0,1fr) auto!important;
  grid-template-areas:
    'avatar edit edit'
    'avatar meta meta'!important;
  align-items:start!important;
  gap:10px 16px!important;
  margin-top:-34px!important;
  padding:0 16px 0 18px!important;
}
.profile-wrap>.identity>.avatar{grid-area:avatar!important;align-self:start!important;position:relative;z-index:6!important}
.profile-wrap>.identity>.profile-edit-link{grid-area:edit!important;justify-self:end!important;align-self:start!important;margin:0!important}
.profile-wrap>.identity>div:not(.avatar):not(.profile-level-badge){grid-area:meta!important;align-self:start!important;max-width:100%!important;padding-top:2px!important}
.profile-wrap>.identity #title,.profile-wrap>.identity #nick{display:block!important;background:transparent!important;border:0!important;backdrop-filter:none!important;box-shadow:none!important;padding:0!important;width:auto!important;max-width:100%!important}
.profile-wrap>.identity #title{font-size:clamp(24px,2.5vw,35px)!important;line-height:1.05!important;margin:0 0 4px!important}
.profile-wrap>.identity #nick{font-size:18px!important;line-height:1.2!important;opacity:.95!important;margin:0 0 8px!important}
.profile-wrap>.identity .profile-exp{max-width:340px;margin:6px 0 8px!important}
.profile-wrap>.identity .profile-friend-add{margin:4px 0 8px!important}
.profile-wrap>.identity #since{margin:0!important;font-size:13px!important;opacity:.88}
.profile-level-badge{left:-12px;top:58px}
#about{margin:18px 0 12px}
.banner{overflow:visible}
.banner.has-shop-frame::after{inset:-5px}

/* Purchased profile effects: animated butterflies around avatar and banner. */
.banner,.avatar{position:relative}
.profile-butterfly-layer{position:absolute;inset:0;pointer-events:none;z-index:9;overflow:visible}
.profile-butterfly{position:absolute;width:22px;height:18px;opacity:.92;filter:drop-shadow(0 2px 4px #0008);animation:profileButterflyFloat var(--dur,7s) ease-in-out infinite;animation-delay:var(--delay,0s)}
.profile-butterfly::before,.profile-butterfly::after{content:'';position:absolute;top:2px;width:12px;height:14px;border-radius:70% 55% 65% 55%;background:radial-gradient(circle at 35% 35%,#fff8,transparent 34%),linear-gradient(135deg,#ffe4ae,#d29bff)}
.profile-butterfly::before{left:0;transform:rotate(-25deg)}
.profile-butterfly::after{right:0;transform:scaleX(-1) rotate(-25deg)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly{transform-origin:center center}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(1){left:-16px;top:-10px}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(2){right:-12px;top:6px;transform:scale(.85)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(3){left:-24px;top:54px;transform:scale(.75)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(4){right:-19px;top:72px;transform:scale(.82)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(5){left:34px;top:-20px;transform:scale(.7)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(6){right:18px;bottom:-10px;transform:scale(.88)}
.profile-butterfly-layer[data-kind='avatar'] .profile-butterfly:nth-child(7){left:12px;bottom:-16px;transform:scale(.65)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(1){left:32px;top:16px}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(2){left:14%;top:58px;transform:scale(.8)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(3){left:26%;top:18px;transform:scale(.92)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(4){left:39%;bottom:14px;transform:scale(.82)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(5){left:54%;top:10px;transform:scale(.88)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(6){left:66%;top:56px;transform:scale(.74)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(7){left:76%;bottom:20px;transform:scale(.95)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(8){right:76px;top:18px;transform:scale(.76)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(9){right:24px;top:70px;transform:scale(.86)}
.profile-butterfly-layer[data-kind='banner'] .profile-butterfly:nth-child(10){right:140px;bottom:10px;transform:scale(.7)}
@keyframes profileButterflyFloat{0%,100%{transform:translate3d(0,0,0) rotate(-3deg)}25%{transform:translate3d(8px,-9px,0) rotate(5deg)}50%{transform:translate3d(-4px,-14px,0) rotate(-6deg)}75%{transform:translate3d(10px,-5px,0) rotate(4deg)}}

@media(max-width:650px){
  .profile-wrap>.identity{grid-template-columns:82px minmax(0,1fr) 38px!important;grid-template-areas:'avatar edit edit' 'avatar meta meta'!important;margin-top:-26px!important;padding:0 8px!important;gap:8px 10px!important}
  .profile-wrap>.identity>.avatar{width:82px!important;height:82px!important}
  .profile-wrap>.identity #title{font-size:22px!important}
  .profile-wrap>.identity #nick{font-size:15px!important;margin-bottom:6px!important}
  .profile-wrap>.identity .profile-exp{max-width:100%}
  .profile-level-badge{left:-8px;top:38px}
}
/* 0.33: small linked preview of the real book shelves in the account profile. */
.profile-library-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.profile-library-heading h2{margin:0}.profile-library-heading a{font-size:13px}
.profile-library-help{font-size:13px;color:var(--muted,#bcaebf)}
.profile-library-filter{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:14px 0}
.profile-library-filter button{font-size:12px;padding:7px 10px;background:var(--ui);border-color:var(--ln)}
.profile-library-filter button.on{background:var(--ac,#a76b8d);color:white}
.profile-library-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.profile-library-item{display:flex;min-width:0;gap:12px;border-radius:12px;padding:12px;border:1px solid var(--ln);background:var(--ui)}
.profile-library-cover{height:116px;flex:0 0 78px;position:relative;display:grid;place-items:center;border-radius:9px;overflow:hidden;background:var(--bg);font-size:24px}
.profile-library-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.profile-library-cover img[hidden]{display:none}
.profile-library-content{display:grid;gap:6px;min-width:0;flex:1;align-content:start}
.profile-library-title{font-weight:700;display:block;overflow-wrap:anywhere}
.profile-library-content small{font-size:11px;color:var(--muted,#a99ca9)}
.profile-library-progress{height:5px;min-width:0;background:color-mix(in srgb,var(--fg) 15%,transparent);border-radius:8px;overflow:hidden}
.profile-library-progress i{display:block;height:100%;background:var(--gold,#e2b76d)}
.profile-library-read{font-size:12px}

/* 0.36: Independent reading level, below the main account-level badge. */
.profile-wrap>.identity>.profile-reading-level-badge{
 position:absolute!important;left:-7px;top:101px;z-index:7;
 width:29px;height:29px;min-width:29px;border:2px solid #7ec4ff;
 border-radius:50%;background:#0d274a;color:#c5eaff;
 box-shadow:0 2px 9px #07132dba;display:grid;place-items:center;
 font-weight:800;font-size:12px;line-height:1;
}
.profile-reading-progress{display:flex;gap:7px 13px;flex-wrap:wrap;align-items:center;margin:6px 0 8px!important;font-size:12px;color:#9fd3ff;}
.profile-reading-progress #profile-reading-xp-text{opacity:.85;font-size:11px;}
body.settings-editor .profile-reading-level-badge,body.settings-editor .profile-reading-progress{display:none!important;}
@media(max-width:650px){.profile-wrap>.identity>.profile-reading-level-badge{left:-4px;top:70px;width:25px;height:25px;min-width:25px;font-size:10px}}

/* 0.39.1: visual decoration gallery; legacy selects are retained for save compatibility. */
body.settings-editor #profileForm>label:has(#nicknameEffect),body.settings-editor #profileForm>label:has(#frame),body.settings-editor #profileForm>label:has(#shopAvatarFrame),body.settings-editor #profileForm>label:has(#shopBannerFrame),body.settings-editor #profileForm>label:has(#shopProfileEffect),body.settings-editor #profileForm>label:has(#nameFont),body.settings-editor #profileForm>label:has(#nameColor),body.settings-editor #framePreview,body.settings-editor #fontPreview,body.settings-editor .banner-position-controls,body.settings-editor .banner-position-controls+p{display:none!important}
body.settings-editor.hide-preview-banner .profile-wrap>.banner{visibility:hidden!important}
body.settings-editor.hide-preview-avatar .profile-wrap>.identity .avatar{visibility:hidden!important}
body.settings-editor .decor-entry{margin:16px 0;padding:15px;background:#302035;border:1px solid #74536f;border-radius:14px}
body.settings-editor .decor-entry button{width:100%;font-size:18px;background:#985373;color:white;padding:14px;border-radius:10px}
body.settings-editor .profile-preview-options{padding:12px;margin:8px 0 15px;background:#292033;border-radius:12px}
body.settings-editor .profile-preview-options label{display:block;margin:6px 0}
body.settings-editor .preferences-highlight{display:inline-block;background:#77415d;color:white;padding:12px 18px;border:1px solid #d598b4;border-radius:10px;text-decoration:none;font-weight:bold}
.decor-gallery{width:min(850px,96vw);max-height:88vh;padding:24px;overflow-y:auto;background:#241b2c;border:1px solid #7d5682;border-radius:18px;color:#f5e8f1;box-shadow:0 25px 90px #000c}
.decor-gallery::backdrop{background:#080610c9}.decor-gallery button{cursor:pointer;color:#fff}.decor-head{display:flex;align-items:center;justify-content:space-between}.decor-head h2{display:block!important;margin:0}.decor-head button{font-size:28px;background:none;border:0}.decor-stage{margin:15px 0;background:#18131e;border-radius:15px;overflow:hidden;min-height:190px}.decor-banner{height:135px;background:#59405b center/cover;border:6px solid transparent}.decor-identity{margin:-30px 0 14px 22px;display:flex;align-items:flex-end;gap:22px}.decor-avatar{height:90px;width:90px;border-radius:50%;border:7px solid #b37b9a;background:#443043 center/cover;display:flex;align-items:center;justify-content:center;font-size:36px}.decor-avatar.gold,.decor-thumb.gold{border-color:#ecc34d;box-shadow:0 0 9px #e8bf4daa}.decor-avatar.silver,.decor-thumb.silver{border-color:#b4bccd;box-shadow:0 0 8px #ccd6efaa}.decor-avatar.forest,.decor-thumb.forest{border-color:#67ac81;box-shadow:0 0 8px #6ebc83aa}.decor-identity strong{padding-bottom:8px;font-size:23px}.decor-tabs{display:flex;gap:6px;flex-wrap:wrap}.decor-tabs button{background:#3a2a44;border-radius:9px;padding:9px}.decor-tabs button.active{background:#a75e7d}.decor-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:10px;margin:12px 0}.decor-option{display:grid;justify-items:center;gap:8px;background:#30243b;border:1px solid #685271;border-radius:13px;padding:12px 7px;min-height:118px;overflow-wrap:anywhere}.decor-option.chosen{outline:2px solid #eeb8db;background:#56364e}.decor-option strong{font-size:12px}.decor-thumb{width:65px;height:65px;display:flex;align-items:center;justify-content:center;background:#49334a center/contain no-repeat;border:4px solid #85587b;border-radius:50%;font-size:25px}.decor-foot{display:flex;justify-content:space-between;align-items:center;gap:10px}.decor-foot button{padding:12px;border-radius:9px;background:#a75e7d}

#profile-report{background:#513041;border:1px solid #c784a5;padding:8px 14px;border-radius:10px;color:white;cursor:pointer}
.report-dialog{border:1px solid #825579;border-radius:14px;background:#241b2d;color:white;max-width:560px;width:95%;padding:24px}
.report-dialog::backdrop{background:#05040abc}.report-dialog label{display:block;margin:12px 0}.report-dialog textarea,.report-dialog select{width:100%;padding:12px;background:#1b1422;color:white;border:1px solid #755778;border-radius:9px}.report-actions{display:flex;gap:10px}

.decor-banner{position:relative}.decor-banner #decor-banner-overlay{position:absolute;inset:-4px;pointer-events:none;background:transparent center/100% 100% no-repeat}.decor-avatar{position:relative}.decor-avatar #decor-avatar-overlay{position:absolute;inset:-12px;pointer-events:none;background:transparent center/100% 100% no-repeat}.decor-avatar.decor-butterfly-effect::after{content:'🦋';position:absolute;left:-14px;top:-12px;filter:drop-shadow(0 0 6px #eacdf1);animation:decor-butterfly-hover 2.4s ease-in-out infinite alternate}@keyframes decor-butterfly-hover{0%{transform:rotate(-18deg) translateY(0)}100%{transform:rotate(15deg) translateY(-16px)}}


body.settings-editor.hide-preview-all .profile-wrap>.banner,body.settings-editor.hide-preview-all .profile-wrap>.identity{display:none!important}

/* 0.39.2: related checkbox on the same row; details can be collapsed. */
body.settings-editor .profile-preview-options{padding:0;margin:0 0 12px;max-width:640px}
body.settings-editor .profile-preview-options summary{cursor:pointer;list-style:auto;padding:14px 16px;font-size:16px;font-weight:700}
body.settings-editor .profile-preview-options .preview-option-lines{padding:0 15px 3px}
body.settings-editor .profile-preview-options label{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;max-width:510px!important;width:100%;margin:0!important;padding:9px 0!important;cursor:pointer}
body.settings-editor .profile-preview-options label>span{flex:1;min-width:0}
body.settings-editor .profile-preview-options label>input[type=checkbox]{display:inline-block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;max-width:18px!important;margin:0!important;padding:0!important;vertical-align:middle!important}
body.settings-editor .profile-preview-options p{margin:8px 15px 13px;color:#c8b2cb;font-size:13px}
body.settings-editor .decor-entry{margin:9px 0;padding:12px}
body.settings-editor .decor-entry p{margin:9px 0 0;font-size:13px;line-height:1.45}

.award-privacy-settings{padding:14px;border:1px solid var(--ln,#584158);border-radius:13px;margin-bottom:18px}.award-privacy-settings summary{font-weight:700;cursor:pointer}.award-privacy-content{display:grid;gap:12px;padding-top:14px}.award-privacy-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:7px}.award-privacy-items label{display:flex;align-items:center;gap:9px;padding:7px;background:var(--ui,#302439);border-radius:8px}.award-privacy-content button{justify-self:start}
