*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,sans-serif;background:#1a1a1a;color:#f5f5f5;padding:16px}

/* Шапка */
.top{position:sticky;top:0;z-index:50;background:rgba(42,42,42,.97);backdrop-filter:blur(6px);
     border-radius:8px;padding:14px 16px;margin-bottom:20px;display:flex;flex-direction:column;gap:12px}
.top-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.logo{color:#fff;text-decoration:none;font-size:1.05rem;font-weight:700}
.logo:hover{color:#ffd700}
.top-nav{display:flex;gap:8px;align-items:center}

.btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;background:#3a3a3a;
     color:#fff;border:1px solid #555;border-radius:4px;font-size:.85rem;font-weight:700;
     text-decoration:none;cursor:pointer;transition:.15s}
.btn:hover{background:#4a4a4a;border-color:#777}
.btn.blue{background:#2b6cb0;border-color:#2b6cb0}
.btn.blue:hover{background:#2c5282}
.btn.ghost{background:transparent}
.nav-select{padding:8px 12px;background:#2b6cb0;color:#fff;border:1px solid #2b6cb0;border-radius:4px;
     font-size:.85rem;font-weight:700;cursor:pointer}
.nav-select option{background:#222}

/* Фильтры */
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.filters input,.filters select{padding:8px 12px;background:#3a3a3a;color:#fff;border:1px solid #555;
     border-radius:4px;font-size:.88rem}
#q{flex:1;min-width:180px}
.switch{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;color:#ccc;cursor:pointer;user-select:none}
.switch input{accent-color:#ffd700;width:16px;height:16px;cursor:pointer}
.count{font-size:.8rem;color:#888;margin-left:auto}

/* Сравнение */
.cmp-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:.85rem;color:#aaa;
     border-top:1px solid #3a3a3a;padding-top:10px}
.slots{display:flex;gap:6px;flex-wrap:wrap}
.slot{padding:6px 10px;background:#2b6cb0;color:#fff;border:1px solid #4299e1;border-radius:6px;
     font-size:.8rem;font-weight:700;cursor:pointer}
.slot:hover{background:#c53030;border-color:#fc8181}

/* Сетка */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));
      gap:22px;align-items:start}
@media (min-width:1400px){ .grid{grid-template-columns:repeat(4,1fr)} }

.grid.one{grid-template-columns:minmax(0,720px);justify-content:center}
.h1{grid-column:1/-1;font-size:1.6rem;margin-bottom:4px}

/* Карточка */
.ant{background:#252525;border:1px solid #333;border-radius:12px;padding:18px;
     display:flex;flex-direction:column;box-shadow:0 4px 10px rgba(0,0,0,.3)}
.ant-h{display:flex;gap:14px;align-items:flex-start}
.ant-img{width:88px;height:88px;border-radius:8px;object-fit:cover;background:#3a3a3a;border:1px solid #444;flex:0 0 auto}
.ant-i{flex:1 1 auto;min-width:0}
.ant-i h3{font-size:1.12rem;margin-bottom:6px;line-height:1.25}
.ant-i h3 a{color:#fff;text-decoration:none}
.ant-i h3 a:hover{color:#ffd700}

/* Бэйджи */
.badge{display:inline-block;padding:3px 8px;font-size:.72rem;border-radius:4px;margin:0 4px 4px 0;font-weight:600}
.badge.s{background:#4a5568;color:#e2e8f0}
.badge.war{background:#9b2c2c;color:#fff1f1}
.badge.development{background:#2f855a;color:#f0fff4}
.badge.guards{background:#2b6cb0;color:#ebf8ff}
.badge.shooters{background:#b7791f;color:#fefcbf}
.badge.carriers{background:#6b46c1;color:#faf5ff}
.badge.neutral{background:#4a5568;color:#edf2f7}
.badge.role{background:#3a3a3a;color:#3ed4e5;border:1px solid #555}
.badge.trade,.badge.insect,.badge.plant,.badge.heal,.badge.honeydew,.badge.soil,.badge.meat,.badge.sand{background:#f0fff4;color:#2f855a;border:1px solid #2f855a}

/* Звёздный режим */
.star-sw{flex:0 0 auto;width:34px;height:34px;background:#1e1e1e;border:1px solid #444;border-radius:8px;
     font-size:15px;cursor:pointer;filter:grayscale(1) opacity(.45);transition:.15s}
.ant.star .star-sw{filter:none;border-color:#ffd700;box-shadow:0 0 0 2px rgba(255,215,0,.2)}
.skill-d.star,.star-mark{display:none}
.ant.star .skill-d.base{display:none}
.ant.star .skill-d.star{display:block}
.ant.star .star-mark{display:inline;margin-left:5px}

/* Навыки */
.ant-body{margin-top:10px}
.ant-body>summary{list-style:none;cursor:pointer;padding:8px 0;color:#7fb3e8;font-size:.85rem;
     font-weight:600;text-align:center}
.ant-body>summary::-webkit-details-marker{display:none}
.ant-body>summary::after{content:"▾ " attr(data-label)}
.ant-body[open]>summary::after{content:"▴"}
.skills{display:flex;flex-direction:column;gap:6px;border-top:1px solid #333;padding-top:10px}
.skill{background:#1e1e1e;border:1px solid #2d2d2d;border-radius:6px;padding:10px 12px}
.skill-t{color:#ffd700;font-weight:700;font-size:.87rem;margin-bottom:4px}
.skill-n{display:inline-flex;width:18px;height:18px;margin-right:6px;align-items:center;
     justify-content:center;background:#333;color:#aaa;border-radius:50%;font-size:.7rem;vertical-align:1px}
.skill-d{font-size:.82rem;color:#ccc;line-height:1.5;white-space: pre-line;}
.n{color:#ffb84d;font-weight:700}
.lv-tag{display:inline-block;padding:1px 6px;margin-right:4px;border-radius:3px;
        background:#333;color:#9ab;font-size:.72rem;font-weight:700;vertical-align:1px;white-space:nowrap}
.lv-tag.star-tag{background:#4a3c00;color:#ffd700}

/* Кнопка сравнения */
.cmp-btn{width:100%;margin-top:12px;padding:9px;background:#2d3748;color:#fff;border:1px solid #4a5568;
     border-radius:6px;font-size:.85rem;font-weight:700;cursor:pointer;transition:.15s}
.cmp-btn:hover{background:#4a5568}
.cmp-btn.on{background:#2f855a;border-color:#38a169}
.cmp-btn.on:hover{background:#c53030;border-color:#e53e3e}
.single .cmp-btn,.single .ant-body>summary{display:none}

/* Прочее */
.empty{text-align:center;color:#888;padding:50px 20px}
.nf{text-align:center;padding:80px 20px}
.nf h1{font-size:4rem;color:#ffd700;margin-bottom:10px}
.nf .muted{color:#888;margin:10px 0 24px}
[hidden]{display:none!important}
.site-footer{margin-top:40px;padding:22px 16px;border-top:1px solid #333;background:#1e1e1e;
     text-align:center;border-radius:8px 8px 0 0}
.site-footer p{font-size:.76rem;color:#888;line-height:1.6;margin-bottom:5px}

@media (max-width:720px){
  body{padding:10px}
  .grid{grid-template-columns:1fr}
  .top{padding:12px}
  .logo{font-size:.95rem;text-align:center;width:100%}
  .top-nav{width:100%;display:grid;grid-template-columns:1fr auto;gap:8px}
  .filters select{flex:1 1 calc(50% - 4px);min-width:0}
  #q{flex:1 1 100%}
  .count{width:100%;text-align:center;margin:0}
  .ant-img{width:70px;height:70px}
}

.ant-i h3{font-size:1.1rem;line-height:1.22;text-wrap:balance}
.ant-h{gap:12px}
.ant-img{width:78px;height:78px}