.royal-menu #account[data-view="profile"]{max-width:1280px;padding:clamp(16px,2.8vw,32px);border-radius:16px;background:linear-gradient(145deg,#10263bf5,#061420f5)}
#account[data-view="profile"]>.royal-account-brand,#account[data-view="profile"]>#accountMode{display:none}
#account[data-view="profile"]>.tutorial-heading{margin-bottom:24px;gap:12px;align-items:center}
#account[data-view="profile"]>.tutorial-heading h1{margin:0}
#account[data-view="profile"] .profile-layout{display:grid;grid-template-columns:minmax(230px,290px) minmax(0,1fr);gap:24px;align-items:start}
#account[data-view="profile"] .profile-hero{position:sticky;top:24px;text-align:center;border:1px solid #b99149;border-radius:14px;padding:26px 18px;background:radial-gradient(ellipse at 50% 15%,#284d6d70,transparent 65%),linear-gradient(160deg,#142e47,#071727);box-shadow:inset 0 0 0 4px #0c1d2b,inset 0 0 0 5px #d8b56824;min-width:0}
#account[data-view="profile"] .profile-hero .hero-eyebrow{font-size:9px;letter-spacing:.15em;margin-bottom:24px}
#account[data-view="profile"] #profileAvatar{display:block;width:min(192px,90%);height:auto;aspect-ratio:1;object-fit:cover;border-radius:50%;border:3px solid #ebc575;box-shadow:0 0 0 5px #091521,0 0 0 6px #b28b40,0 12px 30px #0006;margin:0 auto 24px}
#account[data-view="profile"] .profile-hero h2{font:700 clamp(24px,2.5vw,32px)/1.2 Georgia,serif;margin:0 0 6px;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-faction{color:#b7d5e8;margin:0 0 20px;font-size:14px}
#account[data-view="profile"] .profile-rating{font-size:15px;color:#f4d58f;font-weight:700;border-block:1px solid #c3a15c40;padding:12px 0}
#account[data-view="profile"] .profile-hero>button{width:100%;margin:16px 0;min-height:46px}
#account[data-view="profile"] .profile-hero-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:6px 0 18px}
#account[data-view="profile"] .profile-main{min-width:0}
#account[data-view="profile"] .profile-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:5px;background:#06131f;border:1px solid #6e684d;border-radius:12px;margin-bottom:22px}
#account[data-view="profile"] .profile-tabs button{border:0;box-shadow:none;background:transparent;color:#afc2d3;padding:12px 8px;min-width:0;font-size:14px;border-radius:8px;min-height:44px}
#account[data-view="profile"] .profile-tabs button[aria-current="page"]{background:linear-gradient(#e7c775,#ba8c35);color:#1b1b17;text-shadow:none;font-weight:700}
#account[data-view="profile"] .profile-stats-toolbar{display:flex;gap:16px;margin-bottom:18px;align-items:end}
#account[data-view="profile"] .profile-stats-toolbar label{flex:1;min-width:0;font-size:12px;color:#b6c7d7;margin:0}
#account[data-view="profile"] select,#account[data-view="profile"] input{box-sizing:border-box;max-width:100%;width:100%;min-width:0;min-height:44px;font-size:14px}
#account[data-view="profile"] #profileMode,#account[data-view="profile"] #profileAverage{display:block;width:100%;min-width:0;margin:7px 0 0}
#account[data-view="profile"] .profile-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
#account[data-view="profile"] .profile-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:14px 5px;border:1px solid #6b745b66;background:linear-gradient(145deg,#19354b80,#071725);border-radius:9px;text-align:center;min-width:0}
#account[data-view="profile"] .profile-stat strong{font:700 clamp(20px,2.2vw,29px)/1.15 Georgia,serif;color:#ffe2a0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-stat span{font-size:11px;line-height:1.4;color:#b9cbd8;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
#account[data-view="profile"] .profile-section{min-width:0;border:1px solid #a58a5066;border-radius:12px;padding:18px;background:linear-gradient(145deg,#142b3fbb,#071724dd);margin-bottom:18px}
#account[data-view="profile"] .profile-section h3{font:700 22px/1.25 Georgia,serif;color:#ffe1a0;margin:0 0 8px;border:0;padding:0}
#account[data-view="profile"] .profile-section h4{font-size:12px;color:#c5d5e2;margin:20px 0 12px}
#account[data-view="profile"] .profile-caption,#account[data-view="profile"] .profile-empty,#account[data-view="profile"] .profile-coverage{font-size:12px;line-height:1.6;color:#aebfcf;margin:8px 0 12px;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-coverage{border-left:2px solid #b59452;padding:5px 12px;margin:0 0 20px}
#account[data-view="profile"] .profile-empty{padding:16px 0}
#account[data-view="profile"] #profileUnitMeasure{margin:10px 0 16px;font-size:12px}
#account[data-view="profile"] .profile-tier{--tier:#6ac8c2;display:flex;align-items:center;gap:12px;margin:14px 0}
#account[data-view="profile"] .profile-tier.medium{--tier:#b093ed}#account[data-view="profile"] .profile-tier.strong{--tier:#f4c463}
#account[data-view="profile"] .profile-tier img{width:48px;height:48px;object-fit:contain;border-radius:50%;flex:0 0 48px}
#account[data-view="profile"] .profile-tier-copy{flex:1;min-width:0}
#account[data-view="profile"] .profile-value-line{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px;line-height:1.4;margin-bottom:7px}
#account[data-view="profile"] .profile-value-line span{font-weight:700;white-space:nowrap;color:#f6d992;font-variant-numeric:tabular-nums}
#account[data-view="profile"] .profile-bar{height:7px;background:#030e1be0;border-radius:5px;overflow:hidden;border:1px solid #74879730}
#account[data-view="profile"] .profile-bar>span{display:block;height:100%;background:linear-gradient(90deg,var(--tier,#b99149),#f7dd9c);border-radius:4px;max-width:100%}
#account[data-view="profile"] .profile-defense-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:16px}
#account[data-view="profile"] .profile-defense-figures .profile-stat{padding:12px 4px}
#account[data-view="profile"] .profile-defense-figures strong{font-size:22px}
#account[data-view="profile"] .profile-spells{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
#account[data-view="profile"] .profile-spell{border:1px solid #56708370;background:#0c2033;border-radius:8px;padding:10px;min-width:0}
#account[data-view="profile"] .profile-spell summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;padding:0;color:#f1e0be}
#account[data-view="profile"] .profile-spell summary::-webkit-details-marker{display:none}
#account[data-view="profile"] .profile-spell img{width:38px;height:52px;object-fit:cover;border-radius:4px;border:1px solid #d1ab5d80}
#account[data-view="profile"] .profile-spell-copy{min-width:0;flex:1}
#account[data-view="profile"] .profile-spell-chevron{color:#d8b96b}
#account[data-view="profile"] .profile-spell>.profile-caption{margin:12px 0 0}
#account[data-view="profile"] .profile-more,#account[data-view="profile"] .profile-setting{border:1px solid #8d7c504d;border-radius:10px;padding:0 16px;margin:14px 0;background:#0c203280}
#account[data-view="profile"] .profile-more>summary,#account[data-view="profile"] .profile-setting>summary{cursor:pointer;padding:16px 0;color:#f5d696;font-weight:700;font-size:14px}
#account[data-view="profile"] .profile-setting .account-form{padding:8px 0 20px}
#account[data-view="profile"] .profile-setting .account-form h2{display:none}
#account[data-view="profile"] .profile-more .stats-table{font-size:12px;width:100%}
#account[data-view="profile"] .profile-more .stats-table th{white-space:normal;overflow-wrap:anywhere;max-width:260px}
#account[data-view="profile"] .profile-session-actions{display:flex;gap:12px;flex-wrap:wrap}
#account[data-view="profile"] .profile-session-actions>button{flex:1;min-height:44px}
#account[data-view="profile"] .avatar-picker{margin:12px 0 0;padding:0;border:0}
#account[data-view="profile"] .avatar-picker>summary{display:none}
#account[data-view="profile"] .avatar-picker>p{font-size:13px;line-height:1.6}
#account[data-view="profile"] .avatar-filters{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0}
#account[data-view="profile"] .avatar-filters button{font-size:12px;padding:10px 12px;min-height:44px;flex:1 1 auto}
#account[data-view="profile"] .avatar-tools{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
#account[data-view="profile"] .avatar-tools label{font-size:12px;color:#b9cad7;min-width:0}
#account[data-view="profile"] .avatar-tools :is(input,select){display:block;margin-top:7px}
#account[data-view="profile"] .avatar-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:12px;max-height:none;overflow:visible;margin:0;padding:3px}
#account[data-view="profile"] .avatar-choice{padding:12px 6px;border-radius:10px;min-width:0;gap:10px;align-self:stretch}
#account[data-view="profile"] .avatar-choice img{width:min(100%,104px);height:auto;aspect-ratio:1;object-fit:cover;border:1px solid #cfb46d70;box-shadow:0 4px 12px #0005}
#account[data-view="profile"] .avatar-choice span{font-size:12px;line-height:1.4;word-break:normal}
#account[data-view="profile"] :is(button,input,select,summary):focus-visible{outline:2px solid #ffe5a6;outline-offset:3px}
@media(max-width:1000px){#account[data-view="profile"] .profile-layout{grid-template-columns:minmax(205px,240px) minmax(0,1fr);gap:18px}#account[data-view="profile"] .profile-stats-grid{grid-template-columns:1fr}#account[data-view="profile"] .profile-spells{grid-template-columns:1fr}}
@media(max-width:700px){#account[data-view="profile"] .profile-layout{grid-template-columns:1fr;gap:20px}#account[data-view="profile"] .profile-hero{position:static;padding:22px 16px}#account[data-view="profile"] #profileAvatar{width:140px;margin-bottom:20px}#account[data-view="profile"] .profile-hero .hero-eyebrow{margin-bottom:20px}#account[data-view="profile"] .profile-hero>button{max-width:300px}#account[data-view="profile"] .profile-hero-stats{max-width:300px;margin:0 auto 14px}#account[data-view="profile"] .profile-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#account[data-view="profile"] .profile-stats-toolbar{gap:10px}#account[data-view="profile"] .profile-kpis{gap:6px}#account[data-view="profile"] .profile-stat strong{font-size:23px}#account[data-view="profile"] .profile-stat span{font-size:10px}#account[data-view="profile"] .profile-spells{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){#account[data-view="profile"] .profile-stats-grid,#account[data-view="profile"] .profile-spells{grid-template-columns:1fr}#account[data-view="profile"] .profile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}#account[data-view="profile"] .avatar-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#account[data-view="profile"] .avatar-tools{grid-template-columns:1fr}#account[data-view="profile"] .profile-session-actions{flex-direction:column}#account[data-view="profile"] .profile-section{padding:15px}#account[data-view="profile"] .profile-tabs{gap:3px}#account[data-view="profile"] .profile-tabs button{font-size:13px}}
@media(max-width:700px){
 #account[data-view="profile"] .profile-hero{display:grid;grid-template-columns:94px minmax(0,1fr);gap:6px 14px;padding:20px 16px;text-align:left;align-items:center}
 #account[data-view="profile"] .profile-hero .hero-eyebrow{display:none}
 #account[data-view="profile"] #profileAvatar{grid-column:1;grid-row:1/4;width:86px;margin:0;height:86px}
 #account[data-view="profile"] .profile-hero h2{grid-column:2;grid-row:1;font-size:24px;margin:0;align-self:end}
 #account[data-view="profile"] .profile-faction{grid-column:2;grid-row:2;margin:0;font-size:12px}
 #account[data-view="profile"] .profile-rating{grid-column:2;grid-row:3;border:0;padding:0;font-size:12px;align-self:start;line-height:1.5}
 #account[data-view="profile"] .profile-hero>.profile-caption{grid-column:1/-1;text-align:center;margin:5px 0;font-size:11px}
 #account[data-view="profile"] .profile-hero>button{grid-column:1/-1;width:100%;max-width:none;margin:7px 0}
 #account[data-view="profile"] .profile-hero-stats{grid-column:1/-1;width:100%;display:flex;justify-content:center;gap:20px;max-width:none;margin:0}
 #account[data-view="profile"] .profile-hero-stats .profile-stat{flex-direction:row;gap:8px;border:0;background:none;padding:2px 0}
 #account[data-view="profile"] .profile-hero-stats .profile-stat strong{font-size:20px}
 #account[data-view="profile"] .profile-layout{gap:16px}
}

/* Gold symbols for lifetime victories, games and leaderboard placement. */
#account[data-view="profile"] .profile-stat>span{display:flex;align-items:center;justify-content:center;gap:5px}
#account[data-view="profile"] .profile-stat-icon{display:block;width:22px;height:22px;flex:0 0 22px;object-fit:contain}
#account[data-view="profile"] .profile-hero-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){#account[data-view="profile"] .profile-hero-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}#account[data-view="profile"] .profile-hero-stats .profile-stat{flex-direction:column;gap:5px}#account[data-view="profile"] .profile-stat-icon{width:18px;height:18px;flex-basis:18px}}


/* Profile statistics use the same static card dialog as the game. */
#account[data-view="profile"] .profile-spell-hint{display:block;font-size:10px;line-height:1.4;color:#b5cedd;margin-top:7px}
#account[data-view="profile"] .profile-spell[open] .profile-spell-hint{display:none}
#account[data-view="profile"] .profile-card-info-button{display:block;min-height:44px;width:100%;margin:14px 0 10px;text-align:center}
.hand-card-dialog .profile-card-info{width:100%;box-sizing:border-box}
.hand-card-dialog .profile-card-info>strong{display:block;font-size:12px;color:#f2d594;margin-bottom:8px}
.hand-card-dialog .profile-card-info>small{display:block;font-size:12px;line-height:1.6;color:#b9cedc;margin-top:14px}
.hand-card-dialog .profile-card-preview{animation:none;transform:none;transition:none}

/* Purchase-code ownership stays visible alongside the chosen portrait. */
.premium-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;align-self:center;border:1px solid #e8bd64;border-radius:999px;background:linear-gradient(135deg,#493416,#1b2334);color:#ffe0a0;font:700 12px/1.3 system-ui;padding:5px 12px;letter-spacing:.04em;white-space:nowrap}
.royal-menu #home .profile-trigger .premium-menu-badge{display:table;margin:4px 0 0;padding:2px 7px;font-size:10px;color:#ffe0a0;line-height:1.3}
.premium-entitlement-copy{color:#f4dba5}

/* Building statistics share the existing profile cards and artwork. */
#account[data-view="profile"] .profile-buildings{margin:18px 0}
#account[data-view="profile"] .profile-buildings>summary{cursor:pointer;font:700 21px Georgia,serif;color:#ffe0a0;min-height:44px;align-content:center}
#account[data-view="profile"] .profile-building-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}
#account[data-view="profile"] .profile-building-kpis .profile-stat{padding:12px 7px;min-width:0}
#account[data-view="profile"] .profile-building-kpis .profile-stat>span{font-size:11px;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-building-favorite{color:#f4d994;font-size:13px}
#account[data-view="profile"] .profile-building-grid{display:grid;align-items:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
#account[data-view="profile"] .profile-building{min-width:0;padding:12px;border:1px solid #98794f;border-radius:10px;background:#0a1b2bbb}
#account[data-view="profile"] .profile-building>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:64px}
#account[data-view="profile"] .profile-building>summary::-webkit-details-marker{display:none}
#account[data-view="profile"] .profile-building>summary img{width:64px;height:64px;object-fit:contain;flex:0 0 64px}
#account[data-view="profile"] .profile-building>summary strong{display:block;font:700 15px Georgia,serif;color:#ffe4af;overflow-wrap:anywhere}
#account[data-view="profile"] .profile-building>summary small{display:block;margin-top:6px;font-size:12px;color:#bfd0df}
#account[data-view="profile"] .profile-building[open] .profile-spell-chevron{transform:rotate(180deg)}
#account[data-view="profile"] .profile-building .stats-section{padding:0;margin-top:12px}
#account[data-view="profile"] .profile-building .stats-section h3{font-size:15px}
#account[data-view="profile"] .profile-building .stats-table th{overflow-wrap:anywhere}
#account[data-view="profile"] .profile-building .profile-card-info-button{font-size:13px}
@media(max-width:600px){#account[data-view="profile"] .profile-building-grid{grid-template-columns:1fr}#account[data-view="profile"] .profile-building-kpis .profile-stat strong{font-size:22px}}
