/* Profile-only editorial finish; keeps authentication and data controls intact. */
.account-page:has(#profile-panel:not([hidden])) {
    background: #090809 !important;
    color: #f3eee6;
}
.profile-scene { display: none; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: #090809 url('images/characters-bg.png') center/cover no-repeat; }
.account-page:has(#profile-panel:not([hidden])) .profile-scene { display: block; }
.profile-scene video { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.1); }
.profile-scene::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, #ffffff06 1px, transparent 1px) 0 0/7px 7px, rgba(0,0,0,.85); }
.account-page:has(#profile-panel:not([hidden])) .account-shell { position: relative; z-index: 1; }
.account-page:has(#profile-panel:not([hidden])) .account-shell { max-width: 1240px; }
#profile-panel { --violet: #e7ba79; --muted: #b9adb0; --line: #e9cfab22; gap: 22px; }
#profile-panel .profile-cover { min-height: 300px; padding: 40px; border-radius: 22px; border-color: #b4916955; align-items: end; box-shadow: 0 24px 70px #0006; }
#profile-panel .cover-identity { gap: 28px; }
#profile-panel #profile-avatar { width: 128px; height: 128px; flex-basis: 128px; border-color: #e4be82; background: #151112; box-shadow: 0 0 0 7px #0b090a88, 0 12px 30px #0008; }
#profile-panel #profile-name { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.035em; margin: 12px 0; overflow-wrap: anywhere; }
#profile-panel .cover-identity .account-eyebrow { color: #ebc58e; font-size: 12px; letter-spacing: .2em; }
#profile-panel .profile-rank { color: #f1cd94; background: #332719cc; border-color: #e0b77855; padding: 5px 12px; border-radius: 20px; }
#profile-panel #profile-character-display { color: #d2c3be; font-size: 14px; }
#profile-panel .cover-edit { padding: 12px 18px; border-radius: 10px; color: #f3d7b0; border-color: #bba17b66; background: #151013dd; }
#profile-panel .account-card { background: linear-gradient(140deg,#1c171a,#121013 65%); border-color: var(--line); border-radius: 18px; box-shadow: 0 12px 30px #0002; }
#profile-panel a { color: #e6bd83; }
#profile-panel button { border-radius: 9px; }
#profile-panel button:hover:not(:disabled) { border-color: #e6bd83; background: #362329; }
#profile-panel :focus-visible { outline-color: #f5cd8c; }
#profile-panel .account-primary, #profile-panel #profile-edit { background: linear-gradient(110deg,#9e1d35,#721126); border-color: #ce5b6b66; box-shadow: 0 6px 22px #8a10232b; min-height: 48px; }
#profile-panel .account-identity { padding: 18px; }
#profile-panel .profile-navigation { gap: 8px; }
#profile-panel .profile-navigation a { font-size: 14px; min-height: 44px; color: #c9babe; border-radius: 9px; }
#profile-panel .profile-navigation a>span { color: #d7ac72; }
#profile-panel .profile-navigation a[aria-current] { background: #9e293025; border-color: #b24d5755; color: #f1d3ba; }
#profile-panel .journey-level { padding: 24px; border-color: #c8a16d40; background: linear-gradient(110deg,#2c211d,#171214 70%); border-radius: 18px; }
#profile-panel .journey-level-seal { border-radius: 50%; width: 72px; height: 72px; flex-basis: 72px; border-color: #d7b079; background: linear-gradient(140deg,#66432b,#261b18); box-shadow: inset 0 0 0 5px #120e0c88,0 0 20px #d7932920; }
#profile-panel .journey-level-seal span { color: #e2c399; }
#profile-panel #journey-level { color: #ffe4bc; }
#profile-panel #journey-percent { color: #e6bf86; }
#profile-panel .journey-level-copy p { color: #beafb0; font-size: 14px; }
#profile-panel #journey-progress { height: 9px; accent-color: #dcac69; }
#profile-panel #journey-progress::-webkit-progress-value { background: linear-gradient(90deg,#a37345,#f4ce89); }
#profile-panel #journey-progress::-moz-progress-bar { background: #dcac69; }
#profile-panel .profile-stats a, #profile-panel .profile-stats a:nth-child(2), #profile-panel .profile-stats a:nth-child(3) { min-height: 120px; background: linear-gradient(145deg,#241b1c,#131113); border-color: #b8946338; border-radius: 16px; }
#profile-panel .profile-stats a>span { color: #dcb77f; right: 16px; top: 12px; }
#profile-panel .profile-stats strong { font-size: 38px; color: #f7e8d3; text-shadow: none; }
#profile-panel .profile-stats div>span { color: #bdb0af; font-size: 12px; }
#profile-panel .profile-achievements { padding: 28px; border-color: #b6946138; }
#profile-panel .profile-section-heading h2 { font-size: 21px; color: #f0e1cf; }
#profile-panel .profile-section-heading h2>span { color: #d6a76b; }
#profile-panel .achievement-rank { padding: 10px 0 24px; }
#profile-panel .achievement-rank p { font-size: 14px; color: #bcaeb2; }
#profile-panel .achievement-rank .account-eyebrow { color: #c7a177; font-size: 12px; }
#profile-panel .achievement-score strong { font-size: 40px; }
#profile-panel .trophy-heading h3, #profile-panel .recent-title { font-size: 13px; color: #d4b994; }
#profile-panel .trophy { padding: 24px 12px 18px; border-radius: 14px; }
#profile-panel .trophy.earned, #profile-panel .trophy.earned:nth-child(2), #profile-panel .trophy.earned:nth-child(3) { background: radial-gradient(ellipse at 50% 0,#b47a2b25,transparent 75%),#171315; border-color: #b9966444; }
#profile-panel .trophy-seal { border-radius: 50%; width: 60px; height: 60px; }
#profile-panel .trophy h4 { font-size: 15px; line-height: 1.5; }
#profile-panel .trophy p { font-size: 13px; color: #c0afb2; }
#profile-panel .profile-history-panel { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #131013; }
#profile-panel .profile-history { max-height: 600px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #795441 transparent; }
#profile-panel .profile-history time { font-size: 12px; color: #c3a780; }
#profile-panel .profile-history li>span { color: #b6a5aa; font-size: 13px; }
#profile-panel .profile-favorites { padding: 24px; border: 1px solid var(--line); background: #151113; }
#profile-panel .profile-reading { background: #191315; }
#profile-panel .profile-reading-link { color: #f4d5a9; background: #8f25302c; border-color: #ac6f5544; }
#profile-panel details.account-card { overflow: hidden; background: #161215; border-color: #c49f6d2e; }
#profile-panel details.account-card>summary { padding: 24px 28px; color: #ebd8c0; font-size: 18px; }
#profile-panel details.account-card[open]>summary { border-bottom: 1px solid var(--line); margin-bottom: 24px; background: #21191c; }
#profile-panel #personal-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px; padding: 0 28px 28px; }
#personal-form>fieldset:first-child, #personal-form>.cover-upload, #personal-form>fieldset:last-of-type, #personal-form>#personal-status, #personal-form>#personal-save { grid-column: 1 / -1; }
#profile-panel #personal-form>label { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
#profile-panel #personal-form fieldset { min-width: 0; margin: 0; }
#profile-panel form legend { color: #ebd8bb; font-size: 18px; margin-bottom: 12px; }
#profile-panel .account-note { color: #bcaeb1; font-size: 14px; line-height: 1.7; }
#profile-panel input:not([type=radio]):not([type=checkbox]), #profile-panel textarea, #profile-panel select { background: #0f0c0f; border-color: #b3977944; border-radius: 10px; padding: 14px; color: #f0e4df; font-size: 16px; }
#profile-panel #personal-form .cover-choices label { min-height: 140px; border-radius: 12px; font-size: 14px; }
#profile-panel .cover-choices label:has(:checked) { outline-color: #eac28c; }
#profile-panel .cover-upload { border: 1px dashed #bb97645c; background: #211b1866; padding: 24px; }
#profile-panel #cover-preview { max-height: 260px; object-fit: cover; border-radius: 12px; }
#profile-panel .cover-upload-actions { margin-top: 16px; }
#profile-panel .cover-upload-actions button { padding: 12px 18px; }
#profile-panel #personal-form .trophy-options { gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
#profile-panel #personal-form .trophy-options label { padding: 16px; min-height: 64px; font-size: 14px; border-radius: 10px; border-color: #b79a7533; background: #0e0c0e; }
#profile-panel #personal-form .trophy-options label:has(:checked) { border-color: #ddaf6d88; background: #5a3b242f; }
#profile-panel #personal-save { justify-self: end; width: auto; min-width: 240px; padding: 14px 26px; }
#profile-panel #personal-status { margin: 0; font-size: 14px; }
@media(max-width:900px) {
 #profile-panel .profile-cover { padding: 28px; }
 #profile-panel .profile-achievements { padding: 20px; }
 #profile-panel #personal-form .trophy-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
 #profile-panel .profile-cover { min-height: 300px; padding: 28px 20px; }
 #profile-panel .cover-identity { gap: 18px; align-items: center; }
 #profile-panel #profile-avatar { width: 84px; height: 84px; flex-basis: 84px; }
 #profile-panel #profile-name { font-size: 32px; }
 #profile-panel .cover-edit { align-self: start; }
 #profile-panel .profile-navigation a { font-size: 13px; }
 #profile-panel .journey-level { padding: 18px; }
 #profile-panel .profile-stats a { min-height: 112px; }
 #profile-panel .profile-stats strong { font-size: 30px; }
 #profile-panel .profile-stats div>span { font-size: 12px; }
 #profile-panel .profile-trophies { grid-template-columns: 1fr; }
 #profile-panel .trophy { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 4px 16px; text-align: left; padding: 16px; }
 #profile-panel .trophy-seal { grid-row: 1 / 3; margin: 0; }
 #profile-panel .trophy h4 { min-height: 0; margin: 0; }
 #profile-panel .trophy p { margin: 0; }
 #profile-panel #personal-form { grid-template-columns: 1fr; padding: 0 18px 22px; gap: 22px; }
 #profile-panel details.account-card>summary { padding: 20px 18px; font-size: 17px; }
 #profile-panel #personal-form .cover-choices { grid-template-columns: 1fr; }
 #profile-panel #personal-form .cover-choices label { min-height: 96px; }
 #profile-panel #personal-form .trophy-options { grid-template-columns: 1fr; }
 #profile-panel .cover-upload { padding: 16px; }
 #profile-panel #personal-save { width: 100%; min-width: 0; }
}
