.compare-page{max-width:1240px}.compare-heading h1{font-size:26px;margin:4px 0}.compare-heading p{color:var(--theme-secondary,#a7b9cf);font-size:13px;margin:0 0 16px}.header-profile-link{margin-left:auto;font-size:12px;text-decoration:none;font-weight:700}.compare-form{display:grid;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr) auto;gap:10px;align-items:end;background:var(--theme-panel,#18212c);border:1px solid var(--theme-border,#2b3a4b);border-radius:10px;padding:14px}.pick-player{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,.8fr);gap:6px}.pick-player label{grid-column:1/-1;color:var(--theme-secondary,#b5c7db);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.pick-player input,.pick-player select,.army-filter select{width:100%;min-width:0;padding:9px 10px;border:1px solid var(--theme-border,#40536b);border-radius:7px;background:var(--theme-inset,#111b27);color:var(--theme-text,#e8f0fc);font:inherit;font-size:12px}.pick-player input{text-transform:uppercase}.swap-button,.compare-button{border:1px solid var(--theme-border,#4b698d);border-radius:7px;background:var(--theme-hover,#263e5d);color:var(--theme-text,#e9f2ff);padding:9px 12px;font-weight:800;cursor:pointer}.swap-button{font-size:20px;line-height:17px}.compare-button{background:#2d68db;border-color:var(--theme-blue-border,#2d68db)}.swap-button:hover,.compare-button:hover{filter:brightness(1.15)}.picker-note{min-height:15px;color:var(--theme-link,#93a8c0);font-size:11px;margin:6px 2px 12px}.players-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.player-slot{min-height:126px;border:1px solid var(--theme-border,#304358);border-radius:9px;background:var(--theme-panel,#18212c);overflow:hidden}.slot-status{padding:19px;color:var(--theme-link,#a9bcd2);font-size:13px}.slot-status.error{color:var(--theme-danger,#ffb4ad)}.slot-status[hidden]{display:none}.compare-card{padding:16px}.compare-card-top{display:flex;align-items:flex-start;gap:10px}.compare-card-top img{height:45px;width:45px;object-fit:contain}.compare-card h2{font-size:19px;line-height:1.15;margin:0 0 4px}.compare-card a{font-size:11px}.compare-card-meta{color:var(--theme-secondary,#a9bbd0);font-size:12px;margin-top:3px}.compare-card-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:14px}.compare-card-stats div{border:1px solid var(--theme-border,#34485d);background:var(--theme-inset,#111b27);border-radius:7px;padding:8px}.compare-card-stats span,.score-tile span{display:block;color:var(--theme-link,#9bafc6);font-size:10px;text-transform:uppercase}.compare-card-stats strong{display:block;margin-top:4px;font-size:15px}.card-source{color:var(--theme-link,#849ab1);font-size:11px;margin-top:10px}.compare-notice{border:1px solid var(--theme-border,#456385);border-radius:8px;background:var(--theme-raised,#192b3d);color:var(--theme-link,#c9dcf3);padding:11px 13px;font-size:12px;margin-top:12px}.compare-notice[hidden],#comparisonContent[hidden]{display:none}.compare-tabs{margin-top:16px}.compare-panel{margin-top:0}.score-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.score-tile{border:1px solid var(--theme-border,#35485f);border-radius:8px;padding:12px;background:var(--theme-inset,#111b27)}.score-tile strong{display:block;font-size:24px;margin:4px 0}.score-tile small{color:var(--theme-secondary,#a6b9ce);font-size:11px}.comparison-list{display:grid;gap:8px}.category-row{display:grid;grid-template-columns:150px minmax(0,1fr) minmax(0,1fr);align-items:center;gap:10px;border:1px solid var(--theme-border,#34475d);border-radius:8px;padding:10px;font-size:12px}.category-label{font-weight:800}.category-cell{display:grid;grid-template-columns:85px minmax(50px,1fr);align-items:center;gap:8px}.category-cell b{font-size:13px}.category-cell small{grid-column:1/-1;color:var(--theme-link,#9fb2c8)}.compare-track{height:8px;background:var(--theme-hover,#2b3d51);border-radius:7px;overflow:hidden}.compare-track i{display:block;height:100%;background:#5b94ed;border-radius:7px}.category-cell.right .compare-track i{background:#25b8ac}.army-filter{display:flex;align-items:center;gap:9px;margin:12px 0;font-size:12px;color:var(--theme-link,#a9bed4)}.army-filter select{width:220px}.army-comparison{display:grid;gap:14px}.army-section h3{font-size:12px;margin:0 0 7px;color:var(--theme-link,#b9d2f5);text-transform:uppercase;letter-spacing:.06em}.army-table{width:100%;border-collapse:collapse;font-size:12px}.army-table th,.army-table td{border-bottom:1px solid var(--theme-border,#304053);padding:7px 9px;text-align:left}.army-table th{color:var(--theme-secondary,#a9bad0);background:var(--theme-raised,#202c3a)}.army-table td:nth-child(2),.army-table td:nth-child(3){width:25%}.army-item-name{display:flex;align-items:center;gap:8px}.army-item-name img{width:28px;height:28px;object-fit:contain}.army-icon-fallback{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:var(--theme-hover,#344b63);font-size:10px;font-weight:800}.army-item-name small{display:block;color:var(--theme-link,#8fa7bd)}.missing-level{color:var(--theme-muted,#8293a8)}.partial-label{display:inline-block;color:var(--theme-warning,#ffcf8b);font-weight:700}.full-label{color:var(--theme-success,#75d8ba)}.empty-section{color:var(--theme-link,#8299b1);font-size:12px}@media(max-width:850px){.compare-form{grid-template-columns:1fr 42px 1fr}.compare-button{grid-column:1/-1}.pick-player{grid-template-columns:1fr}.category-row{grid-template-columns:110px 1fr 1fr}.category-cell{display:block}.category-cell .compare-track{margin-top:6px}}@media(max-width:600px){.compare-form{grid-template-columns:1fr 42px 1fr;gap:7px}.pick-player input,.pick-player select{font-size:11px}.players-grid{grid-template-columns:1fr}.compare-card-stats{grid-template-columns:repeat(2,1fr)}.category-row{grid-template-columns:1fr 1fr}.category-label{grid-column:1/-1}.army-table th,.army-table td{padding:6px 4px;font-size:11px}.army-table td:nth-child(2),.army-table td:nth-child(3){width:27%}}
.difference-list{display:grid;gap:7px}.difference-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(140px,1fr) auto;align-items:center;gap:10px;border:1px solid var(--theme-border,#34475d);border-radius:7px;padding:9px;font-size:12px}.difference-row span{color:var(--theme-secondary,#9dafc5)}.difference-row strong{color:var(--theme-text,#d9e8fa)}@media(max-width:600px){.difference-row{grid-template-columns:1fr auto}.difference-row span{grid-column:1}.difference-row strong{grid-column:2;grid-row:1/3;text-align:right}}

.item-level{display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap}
.level-mark{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:6px;font-weight:900;font-size:13px}
.higher-mark{color:#052c20;background:#51ddb1}.equal-mark{color:var(--theme-text,#c4d2e4);background:var(--theme-hover,#33465b)}
.item-level.higher>span:first-child{font-weight:800;color:var(--theme-success,#9cf0cf)}
.war-period-label{display:flex;align-items:center;gap:8px;color:var(--theme-secondary,#afc2d7);font-size:12px}
.war-period-label select{border:1px solid var(--theme-border,#40536b);border-radius:7px;background:var(--theme-inset,#111b27);color:var(--theme-text,#e8f0fc);padding:7px;font:inherit}
.war-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.war-type-card{border:1px solid var(--theme-border,#34485d);background:var(--theme-inset,#111b27);border-radius:8px;padding:12px}
.war-type-card h3{font-size:13px;color:var(--theme-link,#c6dbf6);margin:0 0 9px}
.war-type-players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.war-type-player{border-top:1px solid var(--theme-border,#34485d);padding-top:7px;font-size:12px}
.war-type-player b{display:block;margin-bottom:4px}.war-type-player span{display:block;color:var(--theme-link,#acc0d7);line-height:1.5}
.sample-badge{display:inline-block;margin-top:5px;padding:2px 6px;border-radius:5px;background:var(--theme-hover,#62482a);color:var(--theme-warning,#ffe1a2);font-size:10px;font-weight:800}
.war-charts{display:grid;gap:10px}.war-chart-card{border:1px solid var(--theme-border,#34485d);border-radius:8px;padding:11px;background:var(--theme-panel,#141e29)}
.war-chart-head{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:9px}.war-chart-head small{color:var(--theme-link,#9bafc4)}
.war-chart-side{display:grid;grid-template-columns:minmax(95px,140px) minmax(80px,1fr) minmax(135px,auto);gap:9px;align-items:center;margin:5px 0;font-size:11px}
.war-chart-side .who{color:var(--theme-text,#d8e6f7);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.war-chart-side .metric{text-align:right;color:var(--theme-secondary,#b9cadd)}.war-track{height:12px;border-radius:8px;background:var(--theme-hover,#293a4d);overflow:hidden}
.war-track i{display:block;height:100%;border-radius:8px;background:#5b94ed}.war-chart-side.right .war-track i{background:#28b9a5}
.war-key{display:flex;gap:13px;flex-wrap:wrap;font-size:11px;color:var(--theme-link,#9cafc6);margin:3px 0 11px}
.war-key span::before{content:"";display:inline-block;width:8px;height:8px;border-radius:2px;background:#5b94ed;margin-right:5px}
.war-key span:last-child::before{background:#28b9a5}
.activity-chart{border:1px solid var(--theme-border,#34485d);border-radius:8px;background:var(--theme-inset,#111b27);padding:12px;margin:12px 0}
.activity-chart svg{display:block;width:100%;height:auto;max-height:260px}.activity-legend{display:flex;gap:15px;font-size:11px;color:var(--theme-link,#b6cae1)}
.activity-legend b:first-child{color:var(--theme-link,#79adff)}.activity-legend b:last-child{color:var(--theme-success,#40d3bd)}
.donation-table{overflow-x:auto}.donation-table table{width:100%;border-collapse:collapse;font-size:11px}
.donation-table th,.donation-table td{padding:8px;border-bottom:1px solid var(--theme-border,#34485d);text-align:left}.donation-table th{color:var(--theme-link,#adc2d8);background:var(--theme-raised,#202c3a)}
.reset-badge{color:var(--theme-warning,#ffce83);font-weight:700}.export-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:15px}
.export-actions button{border:1px solid var(--theme-border,#4b698d);border-radius:7px;background:var(--theme-hover,#263e5d);color:var(--theme-text,#e9f2ff);padding:8px 12px;font-weight:700;cursor:pointer}
.export-actions button:disabled{opacity:.4;cursor:not-allowed}.resume-card{margin-top:16px;background:var(--theme-panel,#152532);border-color:var(--theme-border,#3d6680)}
.resume-card h2{font-size:18px;margin:4px 0 10px}.resume-card p{font-size:12px;color:var(--theme-text,#c6d7e8);line-height:1.55;margin:7px 0}
@media(max-width:700px){.war-summary-grid{grid-template-columns:1fr}.war-chart-side{grid-template-columns:80px 1fr}.war-chart-side .metric{grid-column:2;text-align:left}.war-period-label{margin-top:8px}.war-type-players{gap:4px}}


/* Independent per-player War/CWL archives */
.war-player-history{min-width:0;padding:12px;border:1px solid var(--theme-border,#34485d);border-radius:9px;background:var(--theme-inset,#111b27)}
.war-player-history+.war-player-history{margin-top:0px}
.war-player-history-heading,.league-player-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.war-player-history-heading h3,.league-player-card-head h3{margin:0;color:var(--theme-text,#e5effb);font-size:14px}
.war-player-history-heading>span{color:var(--theme-link,#9fb2c8);font-size:11px}
.war-history-clans{margin:6px 0 10px;color:var(--theme-link,#94abc4);font-size:10px}
.war-player-history-list{display:grid;gap:8px}
.war-player-history .war-chart-card{background:var(--theme-panel,#172330)}
.war-own-result{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:8px}
.war-own-result strong{color:var(--theme-link,#b9d6ff);font-size:18px}
.war-own-result span{color:var(--theme-secondary,#bdcce0);font-size:11px}
.war-own-result small{color:var(--theme-link,#94abc4);font-size:10px;text-align:right}
.league-comparison-note{margin:8px 0 13px;padding:10px 12px;border:1px solid var(--theme-border,#344a62);border-radius:8px;background:var(--theme-inset,#111b27);color:var(--theme-secondary,#aebfd3);font-size:11px;line-height:1.5}
.league-comparison-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.league-player-card{min-width:0;padding:13px;border:1px solid var(--theme-border,#34485d);border-radius:9px;background:var(--theme-inset,#111b27)}
.league-player-card-head{align-items:flex-start;margin-bottom:12px}
.league-player-card-head select{max-width:62%;padding:7px 9px;border:1px solid var(--theme-border,#40536b);border-radius:7px;background:var(--theme-inset,#0e1824);color:var(--theme-text,#e5effb);font:inherit;font-size:11px}
.league-tier-label{display:inline-flex;margin:0 0 5px;padding:4px 8px;border:1px solid var(--theme-border,#6a5938);border-radius:6px;background:var(--theme-raised,#40351f);color:var(--theme-warning,#ffe2a0);font-size:11px;font-weight:800}
.league-session-meta{margin:0 0 11px;color:var(--theme-link,#91a8c1);font-size:10px}
.league-rank-highlight{display:flex;align-items:center;gap:10px;margin-bottom:11px;padding:10px;border:1px solid var(--theme-border,#38597b);border-radius:8px;background:linear-gradient(110deg,var(--theme-raised,#1c3854),var(--theme-panel,#172636));color:var(--theme-link,#b8d7ff)}
.league-rank-highlight strong{font-size:22px;line-height:1}
.league-rank-highlight span{font-size:10px}
.league-mark{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:5px;font-size:11px;font-weight:900}
.league-session-state{display:inline-block;padding:3px 7px;border:1px solid var(--theme-border,#38516b);border-radius:5px;color:var(--theme-link,#bcd5ef);font-size:10px}
.league-quality-note{margin:8px 0 0;color:var(--theme-secondary,#a7bbcf);font-size:10px;line-height:1.6}.league-quality-note small{display:block;color:var(--theme-warning,#d1b47e);font-size:10px}
.league-table-legend{margin:14px 0 10px;color:var(--theme-link,#a5b9d0);font-size:11px;line-height:1.6}
.league-metrics-table-wrap{overflow:hidden;border:1px solid var(--theme-border,#344a62);border-radius:9px}
.league-metrics-table{width:100%;table-layout:fixed;border-collapse:collapse;color:var(--theme-text,#e5effb);font-size:12px}
.league-metrics-table caption{padding:12px;text-align:left;background:var(--theme-panel,#182635);color:var(--theme-link,#b8cce2);font-size:11px;font-weight:800}
.league-metrics-table th,.league-metrics-table td{padding:11px 13px;border-top:1px solid var(--theme-border,#2d4054);text-align:left;vertical-align:top;overflow-wrap:anywhere}
.league-metrics-table thead th{background:var(--theme-raised,#203044);font-size:12px}.league-metrics-table th:first-child{width:36%}.league-metrics-table tbody th{color:var(--theme-secondary,#b6c8dc);font-size:11px;font-weight:600}
.league-metrics-table td:nth-child(2){background:#78adff06}.league-metrics-table td:nth-child(3){background:#43d1bd06}
.league-table-value{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:18px;font-size:13px;font-variant-numeric:tabular-nums}.league-table-value img{flex:0 0 16px;width:16px;height:16px;object-fit:contain}
.league-metrics-table td small{display:block;margin-top:4px;color:var(--theme-link,#8fa7c0);font-size:10px;line-height:1.5}
.league-comparison-resume{margin-top:13px;padding:13px 15px;border:1px solid var(--theme-border,#344a62);border-radius:9px;background:var(--theme-inset,#111b27)}.league-comparison-resume h3{margin:0 0 6px;color:var(--theme-text,#d9e8f8);font-size:13px}.league-comparison-resume p{margin:0;color:var(--theme-link,#afc3d9);font-size:11px;line-height:1.7}
@media(max-width:520px){.league-metrics-table th,.league-metrics-table td{padding:9px 7px}.league-metrics-table th:first-child{width:32%}.league-metrics-table thead th,.league-metrics-table tbody th{font-size:10px}.league-table-value{gap:4px;font-size:11px}.league-metrics-table td small{font-size:9px}.league-metrics-table .league-mark{min-width:15px;height:15px;font-size:9px}.league-table-value img{width:13px;height:13px;flex-basis:13px}}
@media(max-width:760px){.league-comparison-grid{grid-template-columns:1fr}.war-own-result{grid-template-columns:40px minmax(0,1fr)}.war-own-result small{grid-column:2;text-align:left}.league-player-card-head select{max-width:65%}}

/* Comparison overview and focused comparison controls */
.sticky-compare-header{position:sticky;top:46px;z-index:4;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:12px 0 10px;border:1px solid var(--theme-border,#34485d);border-radius:9px;background:var(--theme-raised,#26384b);box-shadow:0 7px 18px var(--theme-shadow,#050a1099);overflow:hidden}
.sticky-player{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 12px;background:var(--theme-panel,#15212e)}.sticky-player.right{background:var(--theme-panel,#14252b)}.sticky-player img{width:30px;height:30px;object-fit:contain}.sticky-player div{display:grid;min-width:0}.sticky-player a{overflow:hidden;color:var(--theme-text,#e7f0fb);font-size:12px;font-weight:800;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.sticky-player small{color:var(--theme-link,#94a9c0);font-size:9px}
.comparison-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(310px,.65fr);align-items:center;gap:20px;padding:15px 17px;border:1px solid var(--theme-border,#36516e);border-radius:10px;background:linear-gradient(120deg,var(--theme-panel,#17283a),var(--theme-panel,#15212d))}.comparison-overview h2{margin:3px 0 5px;font-size:18px}.comparison-overview p{margin:0;color:var(--theme-secondary,#afc1d6);font-size:11px;line-height:1.5}.overview-score{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:hidden;border:1px solid var(--theme-border,#3a4e64);border-radius:8px}.overview-score-item{display:grid;gap:3px;padding:10px;border-right:1px solid var(--theme-border,#3a4e64);text-align:center}.overview-score-item:last-child{border:0}.overview-score-item strong{font-size:21px}.overview-score-item span{overflow:hidden;color:var(--theme-secondary,#aabdd2);font-size:9px;text-overflow:ellipsis;white-space:nowrap}.overview-score-item.left strong{color:var(--theme-link,#78adff)}.overview-score-item.right strong{color:var(--theme-success,#43d1bd)}
.comparison-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin:9px 2px;color:var(--theme-secondary,#9fb1c6);font-size:10px}.comparison-legend span{display:inline-flex;align-items:center;gap:5px}.comparison-legend .level-mark{min-width:18px;height:18px;font-size:10px}
.army-filter{flex-wrap:wrap;gap:8px 9px}.army-filter select{width:auto;min-width:150px}.army-difference-toggle{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--theme-border,#40536b);border-radius:7px;background:var(--theme-inset,#111b27);color:var(--theme-text,#d2dfed);cursor:pointer}.army-difference-toggle input{accent-color:#4b8afa}.army-table th{position:sticky;top:101px;z-index:2}.lower-mark{color:var(--theme-danger,#ffd5d1);background:var(--theme-hover,#6a3035)}.unavailable-mark{color:var(--theme-muted,#92a4b8);background:var(--theme-raised,#273747)}.item-level.lower>span:first-child{color:var(--theme-danger,#e0a3a8)}
.score-tile>strong,.category-cell>b{display:flex;align-items:center;gap:7px}.score-tile .level-mark,.category-cell .level-mark{display:inline-grid;color:inherit;font-size:11px;text-transform:none}.score-tile .higher-mark,.category-cell .higher-mark{color:#052c20}.score-tile .equal-mark,.category-cell .equal-mark{color:var(--theme-text,#c4d2e4)}.score-tile .lower-mark,.category-cell .lower-mark{color:var(--theme-danger,#ffd5d1)}
@media(max-width:700px){.sticky-compare-header{top:78px}.comparison-overview{grid-template-columns:1fr}.army-filter label:not(.army-difference-toggle){width:58px}.army-filter select{flex:1;min-width:calc(100% - 75px)}.army-difference-toggle{width:100%;justify-content:center}.army-table th{top:133px}}
@media(max-width:480px){.sticky-player{padding:7px}.sticky-player img{width:25px;height:25px}.sticky-player small{font-size:8px}.comparison-overview{padding:12px}.overview-score-item{padding:8px 4px}}

/* Shareable tab anchors */
.compare-tab-toolbar{display:flex;align-items:center;gap:12px;margin-top:16px;border-bottom:1px solid var(--theme-border,#304053)}
.compare-tab-toolbar .compare-tabs{flex:1;min-width:0;margin-top:0;margin-bottom:0;border-bottom:0;overflow-x:auto}
.compare-tab-share{flex-wrap:wrap;justify-content:flex-end;padding:6px 0}
.compare-tab-share button{white-space:nowrap}
.compare-tab-share #copyActiveTabLink{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:38px;padding:9px 12px;flex-shrink:0}
.compare-tab-share span:empty{display:none}
.compare-tab-share button:focus-visible{outline:2px solid var(--theme-link,#84b4ff);outline-offset:3px}
@media(max-width:700px){.compare-tab-toolbar{flex-wrap:wrap;gap:0}.compare-tab-toolbar .compare-tabs{flex-basis:100%}.compare-tab-share{width:100%;justify-content:flex-end;padding:8px 0}}
.compare-tabs a{color:var(--theme-secondary,#a8b9ca);border-bottom:2px solid transparent}
.compare-tabs a:first-child{color:var(--theme-secondary,#a8b9ca);border-bottom-color:transparent}
.compare-tabs a[aria-selected=true]{color:var(--theme-link,#84b4ff);border-bottom-color:var(--theme-blue-border,#4b8afa)}
.compare-panel{scroll-margin-top:110px}

/* C7-C9: advanced comparison, charts and structured resume */
.head-to-head-chart{margin:12px 0 15px;padding:12px;border:1px solid var(--theme-border,#34485d);border-radius:9px;background:var(--theme-inset,#111b27)}.head-to-head-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.head-to-head-heading h3{margin:0;font-size:13px}.head-to-head-heading span{color:var(--theme-link,#91a7bf);font-size:10px}.head-to-head-chart svg{display:block;width:100%;height:auto;max-height:330px}.head-to-head-chart .activity-legend{justify-content:center}
.war-advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 18px}.war-advanced-card{padding:12px;border:1px solid var(--theme-border,#34485d);border-radius:9px;background:var(--theme-inset,#111b27)}.war-advanced-card>h3{margin:0 0 10px;color:var(--theme-link,#c6dbf6);font-size:13px}.war-advanced-player{padding:9px 0;border-top:1px solid var(--theme-border,#2d4054)}.war-advanced-player:first-of-type{border-top:0}.war-advanced-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:12px}.quality-badge{padding:2px 6px;border-radius:5px;font-size:9px;font-weight:800;text-transform:uppercase}.quality-rendah{color:var(--theme-warning,#ffd69b);background:var(--theme-gold-soft,#60451f)}.quality-cukup{color:var(--theme-link,#b9d7ff);background:var(--theme-hover,#294a6a)}.quality-baik{color:var(--theme-success,#9cf0cf);background:var(--theme-green-soft,#174d40)}.war-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.war-advanced-metric{display:grid;gap:3px;padding:7px;border-radius:6px;background:var(--theme-panel,#172330)}.war-advanced-metric span{color:var(--theme-link,#91a6bd);font-size:9px}.war-advanced-metric strong{font-size:11px;line-height:1.35}
.activity-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:7px 10px;color:var(--theme-muted,#9aacbf);font-size:10px}.activity-controls label{display:flex;align-items:center;gap:5px}.activity-controls select{padding:6px;border:1px solid var(--theme-border,#40536b);border-radius:6px;background:var(--theme-inset,#111b27);color:var(--theme-text,#e8f0fc);font:inherit}
.resume-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.share-actions{display:flex;align-items:center;gap:8px}.share-actions button{padding:7px 10px;border:1px solid var(--theme-border,#4b698d);border-radius:7px;background:var(--theme-hover,#263e5d);color:var(--theme-text,#e9f2ff);font-weight:800;cursor:pointer}.share-actions span{min-width:75px;color:var(--theme-success,#7ce0bd);font-size:10px}.resume-card>#resumeText{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.resume-section{padding:11px;border:1px solid var(--theme-border,#34485d);border-radius:8px;background:var(--theme-inset,#111b27)}.resume-section h3{margin:0 0 7px;font-size:12px}.resume-section ul{margin:0;padding-left:17px;color:var(--theme-text,#c6d7e8);font-size:11px;line-height:1.5}.resume-section li+li{margin-top:4px}.resume-section.left{border-top:2px solid var(--theme-blue-border,#79adff)}.resume-section.right{border-top:2px solid var(--theme-green-border,#40d3bd)}.resume-section.equal{border-top:2px solid var(--theme-border,#697f98)}.resume-section.recommendation{border-top:2px solid var(--theme-gold-border,#e8b55d)}.resume-section.quality{border-top:2px solid var(--theme-border,#b689d6)}
@media(max-width:700px){.war-advanced-grid,.resume-card>#resumeText{grid-template-columns:1fr}.war-metric-grid{grid-template-columns:1fr}.activity-controls{justify-content:flex-start}.resume-heading{align-items:flex-start;flex-direction:column}.head-to-head-chart{padding:7px}}
.loading-state{display:flex;align-items:center;gap:9px}.loading-spinner{display:inline-block;width:16px;height:16px;flex:0 0 16px;border:2px solid var(--theme-border,#40546b);border-top-color:var(--theme-blue-border,#76a8ff);border-radius:50%;animation:loading-spin .8s linear infinite}@keyframes loading-spin{to{transform:rotate(360deg)}}

.legend-comparison{margin-bottom:24px;padding-bottom:22px;border-bottom:1px solid var(--theme-border,#344a62);min-width:0}
.legend-comparison>h2{margin:0 0 12px;font-size:19px;color:var(--theme-text,#e8edf5)}
.legend-records{margin-top:12px;border:1px solid var(--theme-border,#344a62);border-radius:9px;padding:10px;background:var(--theme-inset,#111b27)}
.legend-records>summary{cursor:pointer;font-size:12px;font-weight:700;color:var(--theme-text,#e8edf5)}
.legend-records .league-metrics-table-wrap{margin-top:10px}
.legend-comparison[hidden],#leagueMetricsTable[hidden]{display:none}

/* Native modal drawer keeps the comparison page compact and traps keyboard focus. */
.open-compare-battle{margin-top:12px;padding:9px 12px;border:1px solid var(--theme-action-bg,#2563eb);border-radius:8px;background:var(--theme-action-bg,#2563eb);color:var(--theme-action-text,#fff);font:inherit;font-size:12px;font-weight:750;cursor:pointer;transition:background-color .15s,border-color .15s}
.open-compare-battle:hover{background:var(--theme-action-hover,#1d4ed8);border-color:var(--theme-action-hover,#1d4ed8)}
.open-compare-battle:focus-visible{outline:2px solid var(--theme-link,#93c5fd);outline-offset:3px}
body.compare-battle-open{overflow:hidden}
.compare-battle-drawer{box-sizing:border-box;position:fixed;inset:0 0 0 auto;margin:0;width:min(580px,100vw);max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;border-radius:14px 0 0 14px;overflow-y:auto;overscroll-behavior:contain;padding:0;scrollbar-gutter:stable}
.compare-battle-drawer::backdrop{background:#050c18b8}
.compare-battle-header{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px;border-bottom:1px solid var(--theme-border,#40536b);background:var(--theme-panel,#1c2633)}
.compare-battle-header>div{min-width:0}.compare-battle-header h2{margin:0;font-size:19px}.compare-battle-header p{margin:6px 0 0;color:var(--theme-secondary,#b7c7da);font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.compare-battle-header button{width:36px;height:36px;flex:0 0 36px;border:1px solid var(--theme-border,#40536b);border-radius:8px;background:var(--theme-inset,#111b27);color:var(--theme-text,#e8edf5);font-size:24px;cursor:pointer}
.compare-battle-body{padding:18px}.compare-battle-player{display:grid;gap:6px;font-size:12px}.compare-battle-player select{width:100%}
.compare-battle-drawer select{min-width:0;padding:9px;border:1px solid var(--theme-border,#40536b);border-radius:8px;background:var(--theme-inset,#111b27);color:var(--theme-text,#e8edf5);font:inherit;font-size:12px}
.compare-battle-tabs{display:flex;gap:8px;margin-top:14px;border-bottom:1px solid var(--theme-border,#40536b)}
.compare-battle-tabs button{flex:1;padding:11px 6px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--theme-secondary,#b7c7da);font:inherit;font-size:12px;cursor:pointer}
.compare-battle-tabs button[aria-selected=true]{border-bottom-color:var(--theme-link,#84b4ff);color:var(--theme-text,#e8edf5);font-weight:700}
.compare-battle-points{display:flex;align-items:center;flex-wrap:wrap;gap:7px;font-size:12px}.compare-battle-points img{object-fit:contain}
.compare-battle-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:10px}.compare-battle-toolbar label{display:grid;gap:5px;font-size:11px}
.compare-battle-drawer .ranked-battle-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.compare-battle-drawer .ranked-battle-card{min-width:0;padding:6px}.compare-battle-drawer .ranked-battle-card-top{gap:4px;flex-wrap:wrap}.compare-battle-drawer .ranked-battle-card-top strong{font-size:8px}
.compare-battle-drawer .ranked-battle-card small{display:block;font-size:7px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.compare-battle-drawer .ranked-battle-stars{font-size:13px;gap:0}.compare-battle-drawer .ranked-battle-destruction{font-size:8px}.compare-battle-drawer .ranked-battle-destruction span{display:none}.compare-battle-drawer .ranked-defense-bonus-body{flex-direction:column;gap:3px}.compare-battle-drawer .ranked-defense-bonus-body strong{font-size:8px;overflow-wrap:anywhere}
.compare-battle-drawer .empty-section{grid-column:1/-1}
@media(max-width:700px){.compare-battle-drawer{width:100vw;border-radius:0}.compare-battle-header{padding:16px}.compare-battle-body{padding:14px}.compare-battle-drawer .ranked-battle-card{padding:4px}.compare-battle-drawer .ranked-battle-card-top{flex-direction:column;align-items:flex-start;gap:2px}.compare-battle-drawer .ranked-battle-card-top strong{font-size:7px}.compare-battle-drawer .ranked-battle-stars{font-size:11px}.compare-battle-drawer .ranked-battle-destruction strong{font-size:9px}}

.compare-tab-toolbar .compare-tabs{position:static}.compare-tab-share .copy-link-label{min-width:0;color:inherit;font:inherit}

/* Fixed game canvas in a theme-aware preview dialog. */
body.compare-game-open{overflow:hidden}
.compare-game-dialog{width:min(1600px,calc(100vw - 24px));height:calc(100vh - 24px);height:calc(100dvh - 24px);max-width:none;max-height:none;padding:0;border:1px solid var(--theme-border,#40536b);border-radius:14px;background:var(--theme-panel,#1b2639);color:var(--theme-text,#eef2f8);overflow:hidden}
.compare-game-dialog[open]{display:flex;flex-direction:column}
.compare-game-dialog::backdrop,.compare-game-image-dialog::backdrop{background:#050c18c9}
.compare-game-toolbar{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--theme-border,#40536b);flex:0 0 auto}
.compare-game-toolbar>div:first-child{flex:1;min-width:0}.compare-game-toolbar h2{font-size:19px;margin:0}.compare-game-toolbar p{font-size:11px;line-height:1.5;margin:6px 0 0;color:var(--theme-secondary,#b6c8dd)}
.compare-game-options{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;flex-basis:100%}
.compare-game-options label{display:grid;gap:5px;font-size:11px}.compare-game-options select{padding:8px;border-radius:7px;border:1px solid var(--theme-border,#40536b);background:var(--theme-inset,#0c192b);color:var(--theme-text,#eef2f8);font:inherit}
.compare-game-dialog button,.compare-game-image-dialog button{padding:9px 12px;border:1px solid var(--theme-border,#40536b);border-radius:7px;background:var(--theme-raised,#243248);color:var(--theme-text,#eef2f8);font:inherit;font-size:12px;cursor:pointer}
.compare-game-dialog #compareGameExport,.compare-game-image-actions button{background:var(--theme-action-bg,#2563eb);border-color:var(--theme-action-bg,#2563eb);color:var(--theme-action-text,#fff);font-weight:750}
.compare-game-dialog button:disabled{opacity:.5;cursor:default}
.compare-game-dialog :is(button,select):focus-visible,.compare-game-image-dialog button:focus-visible{outline:2px solid var(--theme-link,#93c5fd);outline-offset:3px}
#compareGameFrame{flex:1;width:100%;min-height:0;border:0;background:#171c27}
.compare-game-image-dialog{box-sizing:border-box;width:min(1280px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:18px;border:1px solid var(--theme-border,#40536b);border-radius:12px;background:var(--theme-panel,#1b2639);color:var(--theme-text,#eef2f8)}
.compare-game-image-dialog[open]{display:flex;flex-direction:column;gap:14px}
.compare-game-image-dialog>header{display:flex;justify-content:space-between;gap:12px;align-items:center}.compare-game-image-dialog h2{font-size:18px;margin:0}
.compare-game-image-scroll{overflow:auto;min-height:0}.compare-game-image-scroll img{display:block;width:100%;height:auto}
.compare-game-image-actions{display:flex;gap:10px;flex-wrap:wrap}.compare-game-image-dialog>p{margin:0;font-size:12px;line-height:1.5;color:var(--theme-secondary,#b6c8dd)}
@media(max-width:640px){.compare-game-dialog{width:100vw;height:100dvh;border-radius:0}.compare-game-toolbar{padding:12px;gap:10px}.compare-game-options{gap:8px}.compare-game-options label{flex:1;min-width:0}.compare-game-options select{max-width:100%}.compare-game-options>button{flex-basis:100%}.compare-game-image-dialog{padding:12px}}

.compare-card-top .compare-base-icon{display:inline-block;width:24px;height:24px;margin:0 4px 0 8px;vertical-align:middle;object-fit:contain}
