.clash-profile-page{--cp-bg:#101114;--cp-card:#191c23;--cp-deep:#101216;--cp-line:#2a2e39;--cp-muted:#9aaac5;--cp-blue:#5481fa;background:var(--cp-bg);color:#f1f3f8;min-height:100vh;font-family:var(--font-body),sans-serif}
.clash-profile-page *{box-sizing:border-box}.clash-profile-page [hidden]{display:none!important}.clash-profile-page button,.clash-profile-page input{font:inherit}.clash-profile-page button{cursor:pointer}.clash-profile-page button:focus-visible,.clash-profile-page a:focus-visible,.clash-profile-page summary:focus-visible{outline:3px solid #83a6ff;outline-offset:4px}.clash-profile-page .site-header{background:#191c23;border-bottom:1px solid var(--cp-line);position:relative}.clash-profile-page .site-header__container{max-width:1200px}.clash-profile-page .app-nav__link[data-nav=profile]{color:#83a6ff;background:#5481fa1c}
.cp-shell{max-width:1160px;margin:auto;padding:36px 24px 60px}.cp-page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;gap:20px}.cp-page-heading h1{font-size:clamp(1.5rem,3vw,2.15rem);margin:6px 0;font-weight:850;letter-spacing:-.5px}.cp-page-heading p{color:var(--cp-muted);margin:0}.cp-page-heading>img{object-fit:contain;filter:drop-shadow(0 10px 16px #0006)}.cp-eyebrow{color:#89a7fc;font-size:.7rem;letter-spacing:1.6px;font-weight:800}
.cp-search{padding:18px 22px;border:1px solid var(--cp-line);border-radius:18px;background:var(--cp-card);margin-bottom:24px}.cp-search label{font-size:.82rem;color:var(--cp-muted);display:block;margin-bottom:8px}.cp-search>div{display:flex;gap:10px}.cp-search input{background:var(--cp-deep);color:#f2f5ff;border:1px solid #343a48;border-radius:11px;padding:12px 16px;flex:1;min-width:0;font-weight:750;letter-spacing:1px;outline:none}.cp-search input:focus{border-color:var(--cp-blue);box-shadow:0 0 0 3px #5481fa22}.cp-search button,.cp-primary{background:var(--cp-blue);color:white;border:0;border-radius:12px;padding:12px 22px;font-weight:750;transition:background .2s}.cp-search button:hover,.cp-primary:hover{background:#6d93ff}.cp-search button span{margin-inline-start:14px}.cp-secondary{background:transparent;border:1px solid var(--cp-line);color:#e8ecf7;border-radius:24px;padding:10px 18px;font-weight:750}.cp-wide{width:100%;display:block;margin-top:10px;border-radius:25px}
#profileStatus:not(:empty){padding:12px 16px;background:#5481fa12;border:1px solid #5481fa33;border-radius:12px;color:#bed0ff;margin-bottom:18px;line-height:1.8}.cp-layout{display:grid;grid-template-columns:350px minmax(0,1fr);gap:24px;align-items:start}.cp-sidebar,.cp-content{min-width:0}.cp-card{background:var(--cp-card);border:1px solid #ffffff05;border-radius:22px;padding:24px;margin-bottom:22px}.cp-card h2{font-size:1.1rem;display:flex;align-items:center;gap:9px;margin:0 0 18px;font-weight:850}.cp-card h3{font-size:.95rem;margin:0;font-weight:800}.cp-card h4{font-size:.9rem;margin:20px 0 9px;display:flex;align-items:center;gap:7px}.cp-card p{line-height:1.8}.cp-muted,.cp-card small,.cp-footnote{color:var(--cp-muted)}.cp-footnote{font-size:.76rem;line-height:1.8;margin:18px 0 0}.cp-attribution{color:#7b8ba5;font-size:.76rem;text-align:center;margin-top:22px}.cp-player-heading{display:flex;align-items:center;gap:16px;margin-bottom:18px}.cp-townhall{width:64px;height:72px;object-fit:contain}.cp-player-heading h2{margin:0 0 3px;font-size:1.3rem;overflow-wrap:anywhere}.cp-copy{background:none;border:0;color:var(--cp-muted);padding:0;font-size:.82rem}.cp-chips{display:flex;flex-wrap:wrap;gap:6px}.cp-chips>span{display:inline-flex;align-items:center;gap:5px;background:var(--cp-deep);border-radius:20px;padding:4px 9px;font-size:.7rem;font-weight:750;line-height:1.6}.cp-chips img{width:17px;height:17px;object-fit:contain}.cp-chips em{font-size:.6rem;font-style:normal;color:#ffa93f;background:#3c2913;border-radius:10px;padding:0 5px}.cp-blue{color:#7096ff!important}.cp-source{color:var(--cp-muted);font-size:.7rem;margin:12px 0 18px}.cp-source i{display:inline-block;width:7px;height:7px;background:#36c482;border-radius:50%;margin-inline-end:5px}.cp-streamer{color:#d173ed;font-size:.75rem;border:1px dashed #7a358d;border-radius:15px;display:inline-block;padding:3px 9px;margin-bottom:10px}.cp-ranks{display:flex;flex-wrap:wrap;gap:7px;padding-top:18px;margin:20px 0 16px;border-top:1px solid var(--cp-line)}.cp-ranks>span{display:inline-flex;align-items:center;gap:5px;background:var(--cp-deep);padding:4px 9px;border-radius:20px;font-size:.69rem;font-weight:750}.cp-ranks>.cp-blue{background:#5481fa15}.cp-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cp-metric{background:var(--cp-deep);border-radius:12px;padding:13px 12px;min-width:0}.cp-metric>span{font-size:.68rem;color:var(--cp-muted);display:block;line-height:1.7}.cp-metric>strong{font-size:1.1rem;display:flex;align-items:center;gap:5px;line-height:1.5;overflow-wrap:anywhere}.cp-game-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none}.cp-game-icon img{width:100%;height:100%;object-fit:contain}.cp-image-fallback{display:inline-flex;align-items:center;justify-content:center;color:#c0a0ff;font-size:1rem}.cp-tabs{display:flex;gap:5px;padding:7px;background:#191c23;border:1px solid var(--cp-line);border-radius:30px;margin-bottom:18px;position:sticky;top:10px;z-index:5}.cp-tabs button{flex:1;background:none;border:0;border-radius:22px;padding:10px 8px;color:#a5aec1;font-size:.83rem;font-weight:750;white-space:nowrap}.cp-tabs button.is-active{color:#20232d;background:#eef1f8;box-shadow:0 2px 6px #0003}
.cp-war-overview{display:flex;gap:16px;align-items:center;padding:8px 0 20px}.cp-war-overview>strong{font-size:2.7rem;line-height:1;color:#f7c44c;font-weight:900}.cp-war-overview>span{font-size:.83rem}.cp-war-overview small{display:block;margin-top:5px}.cp-war-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.cp-war-stats .cp-metric{padding:10px}.cp-matchups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;border-block:1px solid var(--cp-line);margin-block:18px;padding-block:16px}.cp-matchups>div{display:grid;gap:4px;font-size:.75rem}.cp-matchups strong{color:#c6d6ff}.cp-matchups small{font-size:.65rem}.cp-war-card{border:1px solid var(--cp-line);padding:16px;border-radius:17px;margin-top:16px}.cp-war-meta{display:flex;gap:9px;align-items:center;font-size:.68rem;color:var(--cp-muted);flex-wrap:wrap;margin-bottom:15px}.cp-war-meta>span:last-child{margin-inline-start:auto;background:var(--cp-deep);border-radius:12px;padding:2px 8px}.cp-pill{background:#5481fa1c;color:#7f9fff;padding:3px 8px;border-radius:14px;font-size:.65rem;font-weight:750}.cp-war-card>.cp-muted{font-size:.75rem;margin:10px 0}.cp-war-card h4>bdi{margin-inline-start:auto;color:var(--cp-muted);font-size:.8rem}.cp-battle-list{display:grid;gap:6px}.cp-battle{display:flex;align-items:center;gap:8px;background:var(--cp-deep);padding:10px;border-radius:12px;color:#edf1fa;text-decoration:none;min-width:0;transition:background .2s}.cp-battle:hover{background:#242b3d}.cp-battle.is-triple{background:#292316}.cp-battle.is-triple:hover{background:#39301b}.cp-battle img{width:32px;height:36px;object-fit:contain;flex:none}.cp-position{font-size:.7rem;color:var(--cp-muted);min-width:22px}.cp-position:empty{display:none}.cp-opponent{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem;font-weight:800;min-width:30px}.cp-stars{color:#ffc341;white-space:nowrap;font-size:.83rem;letter-spacing:1px;direction:ltr}.cp-stars i{color:#a7afbe;font-style:normal}.cp-battle>strong{font-size:.85rem;min-width:42px;text-align:end;direction:ltr}.cp-duration{font-size:.65rem;min-width:29px;text-align:end}.cp-war-record{margin-top:16px;border:1px solid var(--cp-line);border-radius:15px;padding:12px}.cp-war-record summary{cursor:pointer;list-style:none;font-size:.85rem;font-weight:800}.cp-record-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.cp-record-badges b{font-size:.66rem;background:var(--cp-deep);border-radius:10px;padding:3px 7px;color:#aab8cc}.cp-record-badges .win{color:#36d78b;background:#17362a}.cp-record-badges .lose{color:#ff806d;background:#39231e}.cp-log-row{display:flex;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--cp-line);font-size:.75rem}.cp-log-row small{display:block}.cp-no-battles{font-size:.8rem}
.cp-age{text-align:center}.cp-age>h2{display:block;font-size:clamp(2.3rem,4vw,3.1rem);letter-spacing:-1.5px;margin:6px 0;line-height:1.3}.cp-age>p{color:var(--cp-muted);font-size:.85rem;margin:14px 0}.cp-age>h3{margin:26px 0 12px;font-size:.85rem;line-height:1.8}.cp-age>small{font-size:.65rem}.cp-meter{height:11px;border-radius:8px;background:var(--cp-deep);overflow:hidden;margin:12px 0 8px;direction:ltr}.cp-meter i{display:block;height:100%;background:linear-gradient(90deg,#ffb616,#ff8c1c);border-radius:inherit}.cp-timeline{display:flex;justify-content:space-between;gap:4px;padding:22px 0;margin-block:12px;border-bottom:4px solid #5481fa}.cp-timeline img{width:calc(12.5% - 4px);height:34px;object-fit:contain}.cp-age .cp-metric{text-align:start;border:1px solid var(--cp-line);background:transparent;display:flex;flex-direction:column;justify-content:center;gap:8px}.cp-age-th{height:48px;width:48px;object-fit:contain}.cp-age .cp-footnote{font-size:.7rem}
.cp-category{padding:18px 0;border-bottom:1px solid var(--cp-line)}.cp-category:last-of-type{border-bottom:0;padding-bottom:0}.cp-category-heading{display:flex;align-items:center;gap:10px}.cp-portraits{display:flex;flex:none;direction:ltr;padding-inline-end:4px}.cp-portraits img{width:34px;height:38px;object-fit:cover;border-radius:9px;background:#c2c6dd;box-shadow:0 0 0 2px var(--cp-card);margin-left:-10px}.cp-portraits img:first-child{margin-left:0}.cp-category-heading h3{font-size:.85rem}.cp-category-heading small{font-size:.67rem}.cp-category-heading>strong{margin-inline-start:auto;font-size:1.55rem}.cp-segments{display:flex;gap:3px;height:9px;margin-top:13px;direction:ltr}.cp-segments>span{flex:1;min-width:0;background:#2a2e3b;border-radius:3px;overflow:hidden}.cp-segments i{display:block;height:100%;background:var(--cp-blue);border-radius:2px}.cp-segments .is-max{background:linear-gradient(#ffdc63,#efa90e)}
.cp-season{padding:22px 0;border-bottom:1px solid var(--cp-line)}.cp-season:last-of-type{border-bottom:0}.cp-season summary{list-style:none;cursor:pointer}.cp-season summary::-webkit-details-marker,.cp-war-record summary::-webkit-details-marker{display:none}.cp-season-title{display:flex;align-items:center;gap:12px}.cp-season-title>img{height:44px;width:44px;object-fit:contain}.cp-season-title h3{font-size:.9rem}.cp-season-title small{display:block;font-size:.7rem;margin-top:3px}.cp-season-title>.cp-pill,.cp-chevron{margin-inline-start:auto}.cp-season-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:16px}.cp-season-stats .cp-metric{background:transparent;padding:4px 0;display:flex;flex-direction:column-reverse;justify-content:end}.cp-season-stats .cp-metric>span{font-size:.6rem}.cp-season-stats .cp-metric strong{font-size:1rem}.cp-season-progress{display:flex;align-items:center;gap:12px;margin-top:15px;font-size:.8rem;font-weight:800}.cp-season-progress>div{flex:1;height:6px;border-radius:5px;background:#2a2e39;overflow:hidden;direction:ltr}.cp-season-progress i{height:100%;display:block;background:#32b977;border-radius:inherit}.cp-ranked-group{background:var(--cp-deep);border-radius:14px;padding:12px;margin-top:16px}.cp-ranked-group h4{margin:0 0 12px}.cp-ranked-group .cp-battle{background:var(--cp-card)}.cp-ranked-group .cp-position{display:none}.cp-ranked-group .cp-battle-list{max-height:440px;overflow:auto;scrollbar-width:thin;scrollbar-color:#47516a transparent}
.cp-empty{text-align:center;padding:60px 20px;background:var(--cp-card);border-radius:22px}.cp-empty>img{object-fit:contain}.cp-empty h2{margin:20px 0 12px}.cp-empty p{color:var(--cp-muted);line-height:1.8}.cp-error{text-align:center}.cp-error h2{display:block}.cp-loading{display:grid;grid-template-columns:1fr 1.7fr;gap:24px}.cp-skeleton{height:280px;background:linear-gradient(110deg,#191c23 30%,#242a37 45%,#191c23 60%);background-size:250% 100%;border-radius:22px;animation:cp-shimmer 1.5s infinite}.cp-skeleton:first-child{grid-row:span 2;height:584px}@keyframes cp-shimmer{to{background-position:-250% 0}}
@media(min-width:1100px){.cp-sidebar{position:relative}.cp-content{min-height:700px}}
@media(max-width:900px){.cp-layout{grid-template-columns:310px minmax(0,1fr);gap:16px}.cp-card{padding:18px}.cp-shell{padding-inline:18px}.cp-duration{display:none}.cp-war-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cp-war-card{padding:12px}.cp-battle{gap:5px;padding:9px 7px}.cp-battle img{width:27px}}
@media(max-width:760px){.cp-shell{max-width:540px;padding:22px 12px 40px}.cp-page-heading{margin-bottom:18px}.cp-page-heading h1{font-size:1.4rem}.cp-page-heading>img{width:64px;height:64px}.cp-page-heading p{font-size:.8rem}.cp-search{padding:14px}.cp-search>div{gap:8px}.cp-search input{padding:12px;max-width:none}.cp-search button{font-size:.8rem;padding:10px 14px}.cp-search button span{display:none}.cp-layout{display:flex;flex-direction:column;gap:0}.cp-sidebar,.cp-content{width:100%;display:contents}.cp-player{order:0}.cp-tabs{order:1;top:8px}.cp-content>[data-panel]{order:2;width:100%}.cp-age{order:3;width:100%}.cp-card{padding:20px;border-radius:20px;width:100%;margin-bottom:18px}.cp-player-heading h2{font-size:1.25rem}.cp-player-heading{gap:14px}.cp-player .cp-stats .cp-metric{padding:12px}.cp-tabs{width:100%;margin-bottom:14px}.cp-tabs button{font-size:.77rem;padding:10px 6px}.cp-war-card{padding:14px}.cp-war-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.cp-battle{gap:7px;padding:10px}.cp-battle img{width:29px;height:34px}.cp-stars{font-size:.75rem;letter-spacing:0}.cp-battle>strong{font-size:.8rem;min-width:38px}.cp-opponent{font-size:.77rem}.cp-position{font-size:.65rem;min-width:22px}.cp-matchups{gap:8px}.cp-matchups>div{font-size:.68rem}.cp-loading{display:block}.cp-skeleton{height:250px;margin-bottom:18px}.cp-skeleton:first-child{height:500px}.cp-age>h2{font-size:3.1rem}.cp-season-stats{gap:4px}.cp-season-stats .cp-metric strong{font-size:.95rem}}
@media(prefers-reduced-motion:reduce){.cp-skeleton{animation:none}.clash-profile-page *{scroll-behavior:auto!important;transition:none!important}}
/* Reset the shared floating-header offsets for this page's in-flow header. */
.clash-profile-page .site-header{inset:auto;margin:8px 12px 0;width:calc(100% - 24px)}
.clash-profile-page .site-header__container{margin-inline:auto}
@media(max-width:360px){.cp-shell{padding-inline:10px}.cp-card{padding:15px}.cp-war-card{padding:10px}.cp-battle{gap:5px;padding:8px 6px}.cp-battle img{width:24px}.cp-search button{padding-inline:10px;font-size:.72rem}.cp-search input{width:0}.cp-category-heading{gap:8px}.cp-portraits img{width:30px}.cp-tabs button{font-size:.68rem}}

.cp-dashboard{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;color:#f5f6ff}
.cp-dashboard .cp-card{margin:0;min-width:0;background:linear-gradient(135deg,#1b2236,#191c23 72%);border-color:#818bf52a}
.cp-dashboard-wide{grid-column:1/-1}
.cp-dashboard .cp-stats{grid-template-columns:repeat(auto-fit,minmax(min(100%,135px),1fr))}
.cp-age-highlight{position:relative;overflow:hidden;padding:clamp(19px,4vw,30px);border-radius:22px;border:1px solid #a998fa65;background:radial-gradient(ellipse at 9% 0%,#a461b747,transparent 65%),linear-gradient(120deg,#242049,#152941);box-shadow:0 10px 38px #7465ef29;color:#f5f3ff;animation:cp-result-in .45s ease-out both}
.cp-age-highlight h2{font-size:1rem;color:#e4dcff;margin:0 0 8px}
.cp-age-year{display:block;width:max-content;max-width:100%;font-size:clamp(2rem,6vw,3.6rem);line-height:1.1;color:#ffe2a6;background:linear-gradient(100deg,#ffe2a6,#ffd6ff,#9acbff,#ffe2a6);background-size:220% auto;background-clip:text;-webkit-text-fill-color:transparent;animation:cp-year-light 7s linear infinite}
.cp-age-highlight p{margin:8px 0;color:#deddf0}.cp-age-highlight a{font-size:.78rem;color:#cbd7ff;display:inline-block;margin-top:8px}
.cp-age-highlight progress{display:block;width:100%;height:7px;accent-color:#b49bff}
.cp-highlight-icon{width:36px;height:36px;object-fit:contain;vertical-align:middle}.cp-chips .cp-highlight-icon{width:22px;height:22px}
.cp-clan-link{display:inline-flex;gap:8px;align-items:center;margin-top:12px;color:#c8d9ff}
.cp-details details{padding:13px 0}.cp-details details+details{border-top:1px solid #ffffff1a}.cp-details summary{cursor:pointer;font-weight:750;color:#d7e0ff}.cp-details h3{margin-top:14px}
.cp-clan-dashboard{margin:18px 0}.cp-clan-dashboard[hidden]{display:none}.cp-clan-dashboard>.cp-age-highlight:only-child{grid-column:1/-1}
.cp-season .cp-highlight-icon{margin-inline-end:8px}
@keyframes cp-result-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cp-year-light{to{background-position:220% center}}
@media(max-width:630px){.cp-dashboard{grid-template-columns:minmax(0,1fr);gap:12px}}
@media(prefers-reduced-motion:reduce){.cp-age-highlight,.cp-age-year{animation:none}}

.cp-age-identity { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.cp-age-identity strong { display:block; font-size:clamp(1rem,3vw,1.4rem); overflow-wrap:anywhere; }
.cp-age-identity small { display:block; margin-top:4px; color:#c6cdeb; }
.cp-age-identity img { width:64px; height:64px; object-fit:contain; flex:none; filter:drop-shadow(0 5px 12px #8f84ff68); }
.cp-age-affiliation { display:inline-flex; align-items:center; gap:8px; margin-bottom:14px; padding:4px 10px; background:#10162680; border-radius:12px; }
.cp-age-affiliation img { width:25px; height:25px; }
.cp-category-art { width:42px; height:42px; object-fit:contain; border-radius:10px; background:#9098d326; padding:3px; flex:none; }
.cp-info-icon { display:inline-grid; place-items:center; min-width:24px; min-height:24px; margin-inline-end:6px; border-radius:7px; background:#777ee933; color:#ffe2a6; font-style:normal; }

/* Keep the profile header within the viewport when the shared store theme is active. */
body.clash-profile-page .site-header {
    width: auto;
    margin: 0;
    background: linear-gradient(115deg, #181e52, #272361 58%, #182459);
    border-bottom: 1px solid #97a8ff38;
}
body.clash-profile-page .site-header .app-nav { mask-image: none; }
.cp-category-gallery { display: flex; flex: none; align-items: center; padding-block: 4px; }
.cp-category-gallery .cp-category-art {
    width: clamp(29px, 8vw, 44px);
    height: clamp(29px, 8vw, 44px);
    background: linear-gradient(150deg, #717bc7, #313760 72%);
    border: 1px solid #bfd0ff55;
    box-shadow: 0 4px 9px #0c10285c;
}
.cp-category-gallery .cp-category-art + .cp-category-art { margin-inline-start: -7px; }
.cp-category-label { min-width: 0; }
.cp-category-label h3 { margin: 0 0 3px; }
.cp-category-label small { display: block; }
.cp-category-heading > strong { flex: none; }

.cp-category-expand > summary { list-style: none; padding: 6px; border-radius: 12px; }
.cp-category-expand > summary::-webkit-details-marker { display: none; }
.cp-category-expand > summary:hover { background: #9aabff12; }
.cp-category-title { display: block; font-weight: 750; }
.cp-category-toggle { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #8494fc2b; flex: none; }
.cp-category-expand[open] .cp-category-toggle { transform: rotate(180deg); }
.cp-unit-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,105px),1fr)); gap: 8px; list-style: none; padding: 0; margin: 12px 0 4px; }
.cp-unit-grid li { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 10px 6px; text-align: center; border-radius: 12px; background: linear-gradient(155deg,#8494fc28,#10132970); border: 1px solid #8494fc36; }
.cp-unit-grid img { object-fit: contain; }
.cp-unit-grid li > bdi { font-size: .78rem; overflow-wrap: anywhere; }
.cp-unit-grid small { color: #ffe4a7; background: #151941; border-radius: 8px; padding: 2px 8px; }

.cp-category-meter { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #9aa8f02b; }
.cp-category-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #617fff, #b69cff); }
