:root{color-scheme:light;--bg:#f8fafd;--ink:#202124;--muted:#5f6368;--blue:#1a73e8;--line:#e3e8ef;--card:#fff;--green:#188038}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Google Sans,Roboto,Arial,sans-serif}.topbar{height:72px;padding:0 max(28px,calc((100vw - 1160px)/2));display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #edf0f4}.brand{display:flex;align-items:center;gap:12px;color:#202124;text-decoration:none;font-size:20px;font-weight:500;letter-spacing:-.5px}.brand b{color:#4285f4;font-weight:700}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#e8f0fe;color:#1a73e8;font-weight:700}.top-actions{display:flex;align-items:center;gap:10px;color:#5f6368;font-size:13px}.live-dot{width:8px;height:8px;border-radius:50%;background:#34a853;box-shadow:0 0 0 4px #e6f4ea}.icon-btn,.close-btn{border:0;background:transparent;font-size:20px;color:#5f6368;cursor:pointer}.page{max-width:1160px;margin:0 auto;padding:36px 24px 24px}.hero{min-height:220px;display:flex;align-items:center;justify-content:space-between;padding:24px 42px;background:linear-gradient(115deg,#e8f0fe,#f3f7ff 60%,#e6f4ea);border-radius:28px;overflow:hidden;position:relative}.eyebrow{font-size:11px;letter-spacing:1.5px;color:#1a73e8;font-weight:700;margin-bottom:12px}.hero h1{font-size:42px;line-height:1.08;letter-spacing:-1.8px;margin:0 0 12px;font-weight:600}.hero h1 span{color:#1a73e8}.hero p,.section-head p{color:#5f6368;line-height:1.55;margin:0;max-width:560px;font-size:14px}.hero-art{width:230px;height:180px;position:relative;display:grid;place-items:center;flex-shrink:0}.hero-emblem{font-size:92px;z-index:1;filter:drop-shadow(0 12px 10px #8ca8ce55)}.orb{position:absolute;border-radius:50%;filter:blur(1px)}.orb-one{width:150px;height:150px;background:#d2e3fc;right:22px;top:8px}.orb-two{width:76px;height:76px;background:#ceead6;left:8px;bottom:5px}.settings-panel{margin:20px 0;padding:20px 24px;border:1px solid var(--line);border-radius:20px;background:#fff;display:grid;grid-template-columns:1fr 1.4fr;gap:10px 28px;align-items:center}.settings-copy{display:grid;gap:6px}.settings-copy strong{font-size:14px}.settings-copy span,.hint{font-size:12px;color:var(--muted);line-height:1.45}.key-row{display:flex;gap:8px}.key-row input,.searchbox input,select{font:inherit;border:1px solid #dadce0;border-radius:12px;background:#fff;padding:11px 13px;outline:none;min-width:0}.key-row input{flex:1}.key-row input:focus,.searchbox:focus-within,select:focus{border-color:#4285f4;box-shadow:0 0 0 2px #d2e3fc}.primary-btn,.refresh-btn{border:0;border-radius:22px;background:#1a73e8;color:#fff;font:500 13px Google Sans,sans-serif;padding:11px 18px;cursor:pointer;white-space:nowrap}.text-btn{border:0;background:transparent;color:#1a73e8;cursor:pointer}.hint{grid-column:2}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}.stat-card,.content-card{background:var(--card);border:1px solid var(--line);border-radius:20px}.stat-card{padding:18px 22px;display:grid;gap:8px}.stat-card span{font-size:12px;color:var(--muted)}.stat-card strong{font-size:25px;letter-spacing:-.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stat-card small{font-size:11px;color:#80868b}.content-card{padding:26px;margin:18px 0}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.section-head h2{font-size:24px;letter-spacing:-.7px;margin:0 0 7px}.section-head .eyebrow{margin-bottom:8px}.refresh-btn{background:#e8f0fe;color:#1967d2}.toolbar{display:flex;gap:12px;margin:22px 0 12px}.searchbox{display:flex;align-items:center;gap:9px;border:1px solid #dadce0;border-radius:12px;background:#fff;padding:0 12px;flex:1;color:#5f6368}.searchbox input{border:0;box-shadow:none!important;flex:1;padding-left:0}.searchbox span{font-size:22px}.toolbar select{min-width:180px;color:#3c4043}.status{font-size:12px;color:#5f6368;padding:9px 0}.status.error{color:#b3261e}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:11px;color:#80868b;font-weight:500;padding:13px 12px;border-bottom:1px solid var(--line)}td{font-size:13px;padding:14px 12px;border-bottom:1px solid #f0f2f5}tbody tr{cursor:pointer;transition:background .15s}tbody tr:hover{background:#f8fafd}.rank{font-weight:600;color:#5f6368}.player-cell{display:flex;align-items:center;gap:10px;font-weight:600}.avatar{width:34px;height:34px;border-radius:50%;background:#e8f0fe;color:#1967d2;display:grid;place-items:center;font-weight:700}.player-tag{font-size:10px;color:#80868b;font-weight:400;margin-top:3px}.clan{color:#5f6368}.mobile-list{display:none}.source-note{font-size:11px;color:#80868b;padding-top:18px}.source-note a{color:#1a73e8;text-decoration:none}.army-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:20px}.army-card{padding:16px;border:1px solid var(--line);border-radius:16px;background:#fff}.army-card strong{font-size:14px;display:block;margin-bottom:8px}.army-meta{display:flex;gap:14px;color:#5f6368;font-size:11px}.army-pill{display:inline-block;background:#e8f0fe;color:#1967d2;padding:5px 9px;border-radius:20px;font-size:10px;margin-top:12px}.skeleton{height:108px;border-radius:16px;background:linear-gradient(90deg,#f1f3f4,#fafafa,#f1f3f4);background-size:200% 100%;animation:shimmer 1.3s infinite}@keyframes shimmer{to{background-position:-200% 0}}footer{text-align:center;padding:28px 8px;color:#80868b;font-size:11px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#20212466;display:none;align-items:center;justify-content:center;padding:18px;z-index:5}.modal-backdrop.open{display:flex}.player-modal{background:#fff;border-radius:24px;max-width:700px;width:100%;max-height:85vh;overflow:auto;padding:28px;position:relative;box-shadow:0 20px 60px #0002}.close-btn{position:absolute;right:20px;top:14px;font-size:28px}.profile-head{display:flex;align-items:center;gap:14px;padding-right:35px}.profile-avatar{width:54px;height:54px;border-radius:18px;background:#e8f0fe;display:grid;place-items:center;font-size:25px}.profile-head h2{margin:0 0 5px;font-size:22px}.profile-head p{margin:0;color:#5f6368;font-size:12px}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.profile-stat{background:#f8fafd;border-radius:14px;padding:12px}.profile-stat small{display:block;color:#5f6368;font-size:11px}.profile-stat b{font-size:19px}.modal-section-title{font-size:15px;margin:24px 0 12px}.attack-card{border:1px solid var(--line);border-radius:14px;padding:14px;margin:10px 0}.attack-title{display:flex;justify-content:space-between;gap:12px;font-weight:600;font-size:13px}.attack-units{font-size:12px;color:#5f6368;line-height:1.6;margin-top:8px}.empty-state{padding:20px;border-radius:14px;background:#f8fafd;color:#5f6368;font-size:13px;line-height:1.6}.attack-actions{margin-top:10px}.attack-actions a{font-size:12px;color:#1a73e8;text-decoration:none}.muted{color:#80868b;font-size:12px}@media(max-width:760px){.topbar{padding:0 18px;height:62px}.brand{font-size:17px}.top-actions{font-size:11px}.page{padding:18px 14px}.hero{padding:26px 22px;min-height:200px}.hero h1{font-size:32px}.hero-art{width:110px}.hero-emblem{font-size:60px}.orb-one{width:100px;height:100px}.settings-panel{grid-template-columns:1fr;padding:18px}.hint{grid-column:1}.key-row{flex-wrap:wrap}.key-row input{flex-basis:100%}.stats-grid{gap:8px}.stat-card{padding:14px 12px}.stat-card strong{font-size:19px}.stat-card span{font-size:11px}.content-card{padding:18px 14px}.section-head h2{font-size:21px}.section-head p{font-size:12px}.refresh-btn{padding:9px 12px}.refresh-btn span{display:none}.toolbar{flex-direction:column}.toolbar select{width:100%}.table-wrap{display:none}.mobile-list{display:grid;gap:8px}.mobile-player{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px}.mobile-player .grow{flex:1;min-width:0}.mobile-player strong{font-size:13px}.mobile-player small{display:block;color:#80868b;font-size:10px;margin-top:3px}.mobile-player .trophies{font-size:12px;font-weight:600}.army-grid{grid-template-columns:1fr}.profile-stats{gap:6px}.profile-stat{padding:10px 8px}.profile-stat b{font-size:16px}.player-modal{padding:24px 18px}.hero-art{opacity:.8}}.unit-row{display:flex;flex-wrap:wrap;gap:7px;margin:7px 0 12px}.unit-chip{display:inline-flex;align-items:center;gap:5px;background:#f1f3f4;border-radius:18px;padding:4px 8px 4px 5px;font-size:11px;color:#3c4043}.unit-chip img{width:25px;height:25px;object-fit:contain}.attack-units b{font-size:11px;color:#5f6368}.install-btn{border:0;border-radius:20px;background:#e8f0fe;color:#1967d2;font:500 12px Google Sans,sans-serif;padding:9px 13px;cursor:pointer}.install-btn[hidden]{display:none}.help-btn{width:30px;height:30px;flex:0 0 30px;border:1px solid #c7d7f5;border-radius:50%;background:#f4f8ff;color:#1967d2;font:600 15px Google Sans,sans-serif;cursor:pointer}.inline-help{border:0;background:transparent;color:#1a73e8;text-decoration:underline;cursor:pointer;font:inherit;padding:0}.help-dialog{width:min(520px,calc(100% - 32px));border:0;border-radius:22px;padding:30px;background:#fff;color:#202124;box-shadow:0 20px 60px #0003;position:relative}.help-dialog::backdrop{background:#20212477}.help-dialog h2{font-size:24px;margin:0 0 16px}.help-dialog ol{padding-left:22px;line-height:1.65;font-size:13px;color:#3c4043}.help-dialog li{padding:4px 0}.help-dialog a{color:#1a73e8}.help-note{font-size:12px;line-height:1.6;color:#5f6368;background:#f8fafd;padding:12px;border-radius:12px;margin:16px 0}@media(max-width:760px){.install-btn{padding:8px 10px}.help-dialog{padding:26px 20px}}.attack-card{padding:16px;background:linear-gradient(180deg,#fff,#fbfcff);box-shadow:0 2px 8px #20212408}.attack-title{align-items:center;padding-bottom:11px;border-bottom:1px solid #edf0f4}.attack-title>span:first-child{font-size:14px}.attack-title>span:last-child{color:#d58b00;white-space:nowrap}.attack-units{display:grid;grid-template-columns:1fr;gap:4px;margin-top:12px}.attack-units>b{display:block;margin-top:7px;font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:#80868b}.unit-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:8px;margin:3px 0 8px}.unit-chip{position:relative;min-width:0;min-height:82px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:7px 5px 6px;border:1px solid #e8edf5;border-radius:12px;background:#f8faff;color:#3c4043;text-align:center}.unit-image-wrap{position:relative;width:48px;height:48px;display:grid;place-items:center}.unit-chip img{display:block;width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 2px 2px #20212418)}.unit-fallback{display:none;width:38px;height:38px;place-items:center;border-radius:12px;background:#e8f0fe;color:#1967d2;font-size:18px;font-weight:700}.unit-name{max-width:100%;font-size:10px;line-height:1.2;overflow-wrap:anywhere}.unit-count{position:absolute;top:5px;right:5px;padding:2px 5px;border-radius:10px;background:#e8f0fe;color:#1967d2;font-size:9px}.attack-actions{padding-top:10px;border-top:1px solid #edf0f4}.attack-actions a{display:inline-flex;align-items:center;gap:6px;padding:9px 13px;border-radius:20px;background:#e8f0fe;color:#1967d2;font-weight:600}@media(max-width:480px){.unit-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.unit-chip{min-height:76px}.unit-image-wrap,.unit-chip img{width:42px;height:42px}.attack-card{padding:12px}}.attack-card{padding:18px;border:1px solid #dfe6f0;border-radius:18px;background:linear-gradient(160deg,#fff,#f8faff);box-shadow:0 4px 14px #26354b0a}.attack-title{align-items:center;padding-bottom:13px;border-bottom:1px solid #e8edf4}.attack-title>span:first-child{font-size:15px;font-weight:700}.attack-title>span:last-child{color:#b77908;font-size:12px;white-space:nowrap}.army-composition{display:grid;gap:13px;padding-top:12px}.army-unit-group>b{display:block;margin:0 0 7px;color:#6b7280;font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase}.unit-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:8px;margin:0}.unit-chip{position:relative;display:flex;min-width:0;min-height:91px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px 5px;border:1px solid #e6ebf2;border-radius:13px;background:linear-gradient(180deg,#fff,#f4f7fc);color:#303846;text-align:center}.unit-image-wrap{position:relative;display:grid;width:54px;height:54px;place-items:center}.unit-chip img{display:block;width:54px;height:54px;object-fit:contain;filter:drop-shadow(0 3px 2px #18223020)}.unit-fallback{display:none;width:40px;height:40px;place-items:center;border-radius:12px;background:#e8f0fe;color:#1967d2;font-size:19px;font-weight:700}.unit-image-wrap.image-missing .unit-fallback{display:grid}.unit-name{max-width:100%;font-size:10px;font-weight:600;line-height:1.2;overflow-wrap:anywhere}.unit-count{position:absolute;top:5px;right:5px;min-width:21px;padding:3px 5px;border-radius:9px;background:#1967d2;color:#fff;font-size:10px;line-height:1}.army-unavailable{padding:14px;border-radius:12px;background:#f1f4f9;color:#657084;font-size:12px}.attack-actions{margin-top:14px;padding-top:13px;border-top:1px solid #e8edf4}.attack-actions a{display:inline-flex;align-items:center;gap:7px;padding:10px 15px;border-radius:22px;background:#e8f0fe;color:#1558b0;font-size:12px;font-weight:700;text-decoration:none;transition:background .15s}.attack-actions a:hover{background:#d6e5ff}@media(max-width:520px){.attack-card{padding:13px}.unit-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.unit-chip{min-height:82px}.unit-image-wrap,.unit-chip img{width:47px;height:47px}.attack-title>span:first-child{font-size:13px}}.settings-wrap{position:relative}.settings-toggle{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--muted);font-size:17px;cursor:pointer;transition:background .15s,color .15s}.settings-toggle:hover{background:#e8f0fe;color:#1967d2}.settings-menu{position:absolute;z-index:20;right:0;top:43px;width:230px;padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:0 12px 36px #17253b22;color:var(--ink)}.settings-menu[hidden]{display:none}.settings-menu-title{font-size:14px;font-weight:700;margin:1px 2px 12px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 2px;font-size:12px;color:var(--muted)}.settings-row select{width:112px;padding:8px 9px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink);font:inherit}.dark-theme{color-scheme:dark;--bg:#0b1220;--ink:#e7edf6;--muted:#a6b2c2;--blue:#83b7ff;--line:#2a394d;--card:#151f2e;--green:#65cf8b}.dark-theme body{background:var(--bg);color:var(--ink)}.dark-theme .topbar{background:#111a28;border-color:var(--line)}.dark-theme .brand{color:var(--ink)}.dark-theme .brand-mark{background:#203a5c;color:#9cc7ff}.dark-theme .hero{background:linear-gradient(115deg,#172b46,#18273b 60%,#18382f)}.dark-theme .hero p,.dark-theme .section-head p,.dark-theme .profile-head p,.dark-theme .profile-stat small{color:var(--muted)}.dark-theme .stat-card,.dark-theme .content-card,.dark-theme .player-modal,.dark-theme .help-dialog{background:var(--card);border-color:var(--line);color:var(--ink)}.dark-theme .stat-card small,.dark-theme th,.dark-theme .source-note,.dark-theme footer{color:#91a0b3}.dark-theme td{border-color:#27364a}.dark-theme tbody tr:hover,.dark-theme .mobile-player{background:#1b2a3d}.dark-theme .mobile-player{border-color:var(--line)}.dark-theme .avatar,.dark-theme .profile-avatar{background:#203a5c;color:#a9ceff}.dark-theme .toolbar select,.dark-theme .searchbox,.dark-theme .searchbox input,.dark-theme .key-row input{background:#101a29;color:var(--ink);border-color:var(--line)}.dark-theme .searchbox input::placeholder{color:#8392a6}.dark-theme .refresh-btn,.dark-theme .install-btn{background:#203b5e;color:#b3d2ff}.dark-theme .army-card{background:#182538;border-color:#304158}.dark-theme .army-meta,.dark-theme .clan{color:var(--muted)}.dark-theme .army-pill{background:#203b5e;color:#b3d2ff}.dark-theme .attack-card{background:linear-gradient(160deg,#182538,#111b2a);border-color:#304158}.dark-theme .attack-title,.dark-theme .attack-actions{border-color:#304158}.dark-theme .army-unit-group>b,.dark-theme .unit-name{color:#c7d2e1}.dark-theme .unit-chip{background:linear-gradient(180deg,#223249,#192638);border-color:#34465e;color:#e2eaf5}.dark-theme .unit-count{background:#376db2;color:#fff}.dark-theme .unit-fallback{background:#203b5e;color:#b3d2ff}.dark-theme .army-unavailable,.dark-theme .empty-state,.dark-theme .profile-stat,.dark-theme .help-note{background:#1b2a3d;color:#c1ccda}.dark-theme .attack-actions a{background:#203b5e;color:#b3d2ff}.dark-theme .help-dialog ol{color:#c1ccda}.dark-theme .skeleton{background:linear-gradient(90deg,#1a293c,#26364b,#1a293c);background-size:200% 100%}.dark-theme .close-btn,.dark-theme .icon-btn{color:#b9c6d7}.army-number{display:inline-block;margin:0 0 8px;color:var(--blue);font-size:10px;font-weight:800;letter-spacing:1px}.dark-theme .settings-toggle{background:#172538;color:#bdcbe0;border-color:#34465e}.dark-theme .settings-menu{background:#151f2e;border-color:#34465e}@media(max-width:760px){.settings-menu{right:-4px;top:41px}.league-label{display:none}.settings-toggle{width:32px;height:32px}}.army-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.popular-army-card{min-width:0;padding:17px;border:1px solid var(--line);border-radius:18px;background:var(--card);box-shadow:0 3px 12px #17253b0a}.popular-army-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.popular-army-head>div{min-width:0}.popular-army-head strong{display:block;font-size:15px;line-height:1.35}.popular-army-stats{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0 12px;color:var(--muted);font-size:11px}.popular-army-composition .army-unit-group>b{margin-top:8px}.popular-army-composition .unit-row{grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:6px}.popular-army-composition .unit-chip{min-height:78px;padding:6px 4px}.popular-army-composition .unit-image-wrap,.popular-army-composition .unit-chip img{width:43px;height:43px}.popular-army-composition .unit-name{font-size:9px}.copy-army-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:100%;margin-top:14px;padding:10px 14px;border:0;border-radius:22px;background:#e8f0fe;color:#1558b0;font:600 12px Google Sans,sans-serif;cursor:pointer}.copy-army-btn:hover{background:#d6e5ff}.dark-theme .popular-army-card{background:#182538;border-color:#304158}.dark-theme .copy-army-btn{background:#203b5e;color:#b3d2ff}.popular-loading{padding:18px;color:var(--muted);font-size:12px}@media(max-width:760px){.army-grid{grid-template-columns:1fr}.popular-army-card{padding:14px}}.section-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.jump-btn{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--blue);font-size:25px;line-height:1;cursor:pointer;transition:transform .15s,background .15s,border-color .15s}.jump-btn:hover{background:#e8f0fe;border-color:#b8d2f5;transform:translateY(1px)}#leaderboardSection,#popularArmiesSection{scroll-margin-top:18px}body.modal-open{overflow:hidden;overscroll-behavior:none;touch-action:none}.modal-backdrop{overscroll-behavior:contain;touch-action:pan-y}.player-modal{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.dark-theme .jump-btn{background:#172538;border-color:#34465e;color:#b3d2ff}.dark-theme .jump-btn:hover{background:#203b5e}@media(max-width:760px){.section-actions{gap:6px}.jump-btn{width:34px;height:34px;font-size:23px}.section-head{align-items:flex-start}}
