.profile-dialog{width:min(720px,calc(100% - 24px));max-height:90dvh;padding:34px;border:0;border-radius:24px;background:#faf7ef;color:#29243c;overflow:auto}
.profile-dialog::backdrop{background:#29203a99;backdrop-filter:blur(6px)}
.profile-dialog .close{position:sticky;top:0;float:right;z-index:2}
.profile-dialog label{display:block;margin:16px 0 8px;font-weight:700;font-size:13px}
.profile-dialog input,.profile-dialog select{width:100%;padding:14px;border:1px solid #dcd5e6;border-radius:12px;background:white;font:inherit}
.profile-dialog small{display:block;color:#736b80;font-size:12px;line-height:1.6}
.profile-intro{line-height:1.7;color:#736b80;margin-top:14px}
.profile-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:24px 0}
.profile-tabs button{padding:11px 15px;border-radius:12px;background:#ede8e0;font-size:13px}
.profile-tabs .selected{background:#7040ee;color:white}
.profile-heading{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.profile-heading h2{margin:5px 0;font-size:31px}
.profile-avatar,.shop-preview{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;font-size:43px;border-radius:50%;background:#ede5fd;border:3px solid transparent}
.coin-balance{margin-left:auto;padding:10px 14px;border-radius:14px;background:#fff0bc;color:#7c5b0b;white-space:nowrap}
.fan-title{font-size:11px;font-weight:800;letter-spacing:1px;color:#7642c6}
.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:20px 0}
.profile-stats>div{background:white;padding:17px 8px;text-align:center;border-radius:15px;border:1px solid #e6dfed}
.profile-stats b{font-size:29px;display:block;color:#7040ee}.profile-stats span{font-size:11px}
.profile-note{padding:17px 20px;background:#eee7fc;border-radius:16px;margin:20px 0;font-size:13px;line-height:1.7}.profile-note p{margin-top:6px}
.history-row{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #e4dfe8;padding:14px 0;font-size:12px}.history-row>div:last-child{text-align:right}
.profile-empty{color:#736b80;line-height:1.7;padding:20px 0}
.collection-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:17px 0 28px}
.collection-grid .avatar-choice{border:2px solid transparent;background:white;border-radius:16px;min-height:58px;font-size:31px}
.collection-grid .selected{outline:3px solid #7642ed}.frames{grid-template-columns:repeat(5,1fr)}
.frame-lilac{border:3px solid #b98aff!important;box-shadow:0 0 14px #b98aff80}
.frame-gold{border:3px solid #d9a32c!important;background:#fff3d0!important}
.frame-rainbow{border:3px solid #fe6ba7!important;box-shadow:2px 2px 0 #72d8df,-2px -2px 0 #ffe27a}
.frame-mint{border:3px solid #65c6a7!important}.frame-night{border:3px solid #6052a3!important;background:#322b55!important}
.shop-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.shop-item{background:white;border:1px solid #e7dfed;border-radius:18px;padding:17px;text-align:center}
.shop-preview{display:flex;margin:0 auto 12px}.shop-item>b{font-size:13px}.shop-item button{margin-top:12px;width:100%;font-size:11px;padding:10px 4px}
.chest-card{display:flex;align-items:center;gap:17px;width:100%;padding:20px;border-radius:18px;background:#fff0c8;text-align:left;margin:20px 0}.chest-card>span{font-size:45px}.chest-card b{font-size:15px}
.trophy-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0 28px}
.trophy{border:1px dashed #cfc6d9;padding:17px 9px;border-radius:15px;text-align:center;opacity:.5}.trophy.earned{opacity:1;border-style:solid;background:#fff4ce;border-color:#ead28a}.trophy span{display:block;font-size:33px;margin-bottom:7px}.trophy b{font-size:12px}
.title-progress{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:16px 0;border-bottom:1px solid #e4dfe8}.title-progress>div{flex:1}.title-progress>span{font-size:12px}.title-progress progress{width:100%;height:7px;accent-color:#7040ee}
.recovery-code{display:block;background:white;padding:18px;border:2px dashed #b89de8;font-size:19px;overflow-wrap:anywhere;user-select:all;margin-top:20px}
.quiz-options{margin:20px 0}.difficulty-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.difficulty-options button{background:#eee8e2;border:2px solid transparent;border-radius:12px;padding:13px 7px}.difficulty-options button.selected{border-color:#8b62eb;background:#efe7ff}.difficulty-options small{display:block;font-size:10px;margin-top:5px;color:#71677c}
.era-options{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.era-option{display:flex!important;align-items:center;gap:7px;padding:9px 11px;border-radius:10px;border:1px solid #dcd3e7;font-size:12px!important;margin:0!important;cursor:pointer}
.era-option input,.favorite-check input{width:17px!important;height:17px;accent-color:#7040ee}.favorite-check{display:flex!important;gap:10px;align-items:flex-start;padding:14px;background:#f2eaff;border-radius:12px;font-size:12px!important;line-height:1.6}
.quiz-options details{margin:16px 0}.quiz-options summary{font-weight:700;cursor:pointer;font-size:13px}
.game-settings-line{background:#f1ecfb;padding:12px 15px;border-radius:12px;font-size:12px;line-height:1.7;margin:12px 0}
.player-meta{display:block}.player-row .fan-title{display:block;margin-top:4px;font-size:9px}.round-gain{font-size:11px;color:#618035;display:block;text-align:right}
.profile-header{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.beginner-steps{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 8px}.beginner-steps span{background:#ede7f9;border-radius:20px;padding:8px 12px;font-size:12px}
.personal-round{display:flex;justify-content:space-between;gap:12px;background:#ede5fc;padding:15px;border-radius:14px;margin-bottom:16px}.personal-round b{font-size:21px;color:#7040ee}
@media(max-width:640px){
 header{height:auto;min-height:112px;flex-wrap:wrap;gap:10px;padding:16px 20px}
 .header-right{width:100%;justify-content:space-between;gap:12px}
 #profile-button{max-width:calc(100% - 125px);font-size:12px;min-height:42px;background:#eee5ff;border:1px solid #dcccfb;padding:9px 12px;border-radius:12px;margin:0}
 #help{font-size:12px;min-height:42px;margin:0}
 .profile-dialog{padding:24px 18px}.profile-stats{grid-template-columns:repeat(2,1fr)}.shop-grid{grid-template-columns:repeat(2,1fr)}.collection-grid{grid-template-columns:repeat(5,1fr)}.profile-heading{gap:12px}.profile-avatar{width:58px;height:58px;font-size:35px}.profile-heading h2{font-size:26px}.coin-balance{margin-left:0}.profile-tabs button{padding:10px;font-size:11px}.trophy-grid{grid-template-columns:repeat(2,1fr)}
}
.compact-reveal h2{font-size:26px;margin:12px 0 5px}.compact-reveal>p{font-size:13px;color:#736b80}.correct-summary{font-size:12px;line-height:1.7;margin:12px 0}.correct-summary small{display:block;color:#7c6a80}.compact-reveal .personal-round{margin-bottom:0}.auto-reveal .mini-score{margin-top:12px}.auto-reveal .mini-score .player-row{padding:10px 0}.auto-reveal .mini-score .next-count{margin-top:10px}.auto-reveal .auto-top{padding-bottom:12px}
