.lists__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
}

.lists__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.lists__tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.lists__tab.is-active {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.18);
  color: var(--rose);
}

.lists__tab-count {
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.lists__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.lists__card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.lists__card-link {
  display: grid;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
}

.lists__poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.lists__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lists__poster-empty {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #2c2c30, #232326);
}

.lists__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lists__remove {
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.history__list {
  display: grid;
  gap: 0.5rem;
}

.history__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.history__link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.history__poster {
  flex-shrink: 0;
  width: 48px;
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
}

.history__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history__meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.history__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history__ep {
  color: var(--rose);
  font-size: 0.84rem;
}

.history__when {
  color: var(--muted);
  font-size: 0.78rem;
}

.history__remove {
  flex-shrink: 0;
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .history__row {
    flex-wrap: wrap;
  }

  .history__remove {
    width: 100%;
  }
}
