.tl-filters {
  padding-top: 32px;
  padding-bottom: 8px;
}
.filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.filter-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,176,64,.25), transparent);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 6px 14px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(212,176,64,.15);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition: .2s;
}
.chip:hover {
  color: var(--text);
  border-color: var(--border-hover);
}
.chip.active {
  background: rgba(212,176,64,.18);
  border-color: var(--border-gold);
  color: var(--gold-light);
  box-shadow: 0 0 10px rgba(212,176,64,.15);
}
.filter-reset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(212,176,64,.12);
}
.tl-reset {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  transition: .2s;
}
.tl-reset:hover { background: rgba(212,176,64,.08); }
.tl-count {
  font-size: 12px;
  color: var(--text-muted);
}
.tl-count b {
  color: var(--gold-bright);
  font-size: 15px;
}

/* ================= ТИР-ЛИСТ ================= */
.tl-section {
  padding-top: 24px;
  padding-bottom: 16px;
}
.tl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Строка тира */
.tl-tier {
  display: grid;
  grid-template-columns: 130px 1fr;
  background: #16160d;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: .25s border-color;
}
.tl-tier:hover { border-color: var(--border-hover); }
.tl-tier.is-empty { display: none; }

/* Цветной блок тира */
.tl-tier-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 8px;
  text-align: center;
  color: #1a1a0f;
  min-height: 120px;
}
.tl-tier-letter {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.tl-tier-sub {
  font-size: 11px;
  font-weight: 700;
  opacity: .85;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tl-tier-count {
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
  opacity: .9;
}

/* Цвета блоков по тирам */
.tl-tier[data-tier="S"] .tl-tier-label { background: #f26a6a; color: #2a0808; }
.tl-tier[data-tier="A"] .tl-tier-label { background: #f0a860; color: #2a1408; }
.tl-tier[data-tier="B"] .tl-tier-label { background: #f0d158; color: #2a2208; }
.tl-tier[data-tier="C"] .tl-tier-label { background: #8ac06a; color: #0e2a08; }
.tl-tier[data-tier="D"] .tl-tier-label { background: #6a90c0; color: #08182a; }

/* Сетка карточек */
.tl-tier-cards {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

/* ================= КАРТОЧКА ГЕРОЯ ================= */
.tl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
  transition: .2s transform;
  min-width: 0;
}
.tl-card:hover { transform: translateY(-2px); }
.tl-card.is-hidden { display: none; }

.tl-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 60%, #3a3a20 0%, #1e1e10 80%);
  border: 1px solid rgba(0,0,0,.5);
  box-shadow: inset 0 0 12px rgba(0,0,0,.6);
}
.tl-card-media img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center bottom;
  padding: 4px;
  transition: .3s transform;
}
.tl-card:hover .tl-card-media img { transform: scale(1.06); }

/* Фон подложки по редкости */
.tl-card[data-rarity="common"]    .tl-card-media {
  background: radial-gradient(circle at 50% 65%, #4a4a4a 0%, #1a1a1a 80%);
  box-shadow: inset 0 0 14px rgba(156,163,175,.25);
}
.tl-card[data-rarity="uncommon"]  .tl-card-media {
  background: radial-gradient(circle at 50% 65%, #1e4a2a 0%, #0e1a12 80%);
  box-shadow: inset 0 0 14px rgba(34,197,94,.3);
}
.tl-card[data-rarity="rare"]      .tl-card-media {
  background: radial-gradient(circle at 50% 65%, #1a3a4a 0%, #0a1a24 80%);
  box-shadow: inset 0 0 14px rgba(80,224,249,.3);
}
.tl-card[data-rarity="epic"]      .tl-card-media {
  background: radial-gradient(circle at 50% 65%, #3a1a4a 0%, #1a0a24 80%);
  box-shadow: inset 0 0 14px rgba(249,171,255,.3);
}
.tl-card[data-rarity="legendary"] .tl-card-media {
  background: radial-gradient(circle at 50% 65%, #4a3a10 0%, #1a1408 80%);
  box-shadow: inset 0 0 14px rgba(212,176,64,.4);
}

/* Имя поверх низа карточки */
.tl-card-name {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 4px 4px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
  border-radius: 0 0 8px 8px;
}

/* Цветные рамки карточек по редкости */
.tl-card[data-rarity="common"]    .tl-card-media { border-color: #9ca3af; }
.tl-card[data-rarity="uncommon"]  .tl-card-media { border-color: #22c55e; }
.tl-card[data-rarity="rare"]      .tl-card-media { border-color: #50e0f9; }
.tl-card[data-rarity="epic"]      .tl-card-media { border-color: #f9abff; }
.tl-card[data-rarity="legendary"] .tl-card-media { border-color: #d4b040; }

/* ================= ПУСТОЙ РЕЗУЛЬТАТ ================= */
/* Переиспользуем общий .empty-state из main.css, но оставляем .tl-empty как алиас */
.tl-empty {
  margin-top: 24px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  background: var(--bg-card);
  border: 1px dashed var(--border-gold);
  border-radius: 12px;
}
.tl-empty[hidden] { display: none; }
.tl-empty-reset {
  background: transparent;
  border: none;
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: underline;
  font-size: 15px;
  padding: 0;
  margin-left: 4px;
}

/* ================= АДАПТИВ ================= */

/* Планшет */
@media (max-width: 1000px) and (min-width: 721px) {
  .tl-tier { grid-template-columns: 110px 1fr; }
  .tl-tier-label { min-height: 100px; }
  .tl-tier-letter { font-size: 34px; }
  .tl-tier-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px; }
  .tl-card-name { font-size: 10px; }
}

/* Мобильные */
@media (max-width: 720px) {
  .tl-filters { padding-top: 20px; padding-bottom: 8px; }
  .filter-panel { padding: 14px; gap: 12px; border-radius: 12px; }
  .filter-label { font-size: 10px; letter-spacing: 1px; }
  .chip { padding: 5px 11px; font-size: 11px; }
  .filter-reset-row { padding-top: 10px; }
  .tl-reset { padding: 7px 14px; font-size: 11px; }
  .tl-count { font-size: 11px; }
  .tl-count b { font-size: 14px; }

  .tl-section { padding-top: 16px; }

  .tl-tier {
    grid-template-columns: 66px 1fr;
    border-radius: 8px;
  }
  .tl-tier-label {
    padding: 10px 4px;
    min-height: 80px;
  }
  .tl-tier-letter { font-size: 26px; }
  .tl-tier-sub { font-size: 9px; letter-spacing: 0; }
  .tl-tier-count { font-size: 11px; margin-top: 2px; }

  .tl-tier-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px;
  }
  .tl-card-media { border-radius: 6px; }
  .tl-card-name {
    font-size: 9px;
    padding: 10px 3px 3px;
  }

  .tl-empty { padding: 28px 16px; font-size: 14px; }
}

@media (max-width: 400px) {
  .container { padding: 0 10px; }
  .tl-tier { grid-template-columns: 56px 1fr; }
  .tl-tier-label { min-height: 68px; padding: 8px 2px; }
  .tl-tier-letter { font-size: 22px; }
  .tl-tier-sub { font-size: 8px; }
  .tl-tier-count { font-size: 10px; }
  .tl-tier-cards { gap: 3px; padding: 5px; }
  .tl-card-name { font-size: 8px; }
}