html::before {
  content: "";
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  box-shadow: 0 0 14px rgba(255, 138, 0, 0.72);
}

html.is-navigating::before {
  opacity: 1;
  animation: navigation-progress 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

a[href],
button {
  -webkit-tap-highlight-color: transparent;
}

a[href]:active,
button:active {
  filter: brightness(0.82);
}

a[data-navigation-pending="true"] {
  opacity: 0.62;
}

.sort-tabs {
  max-width: 100% !important;
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-tabs button {
  flex: 0 0 auto !important;
  white-space: nowrap;
}

.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.tag-filters[hidden] {
  display: none;
}

.tag-filter {
  border: 1px solid #333;
  border-radius: 999px;
  background: #171717;
  color: #aaa;
  padding: 6px 12px;
  cursor: pointer;
}

.tag-filter.active,
.tag-filter:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.card-tags {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  overflow: hidden;
}

.card-tag {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #303030;
  border-radius: 4px;
  color: #8b8b8b;
  padding: 2px 6px;
  font-size: 10px;
}

.ranking-status {
  min-height: 24px;
  margin: 14px 0 0;
}

@keyframes navigation-progress {
  0% {
    transform: scaleX(0.08);
  }

  45% {
    transform: scaleX(0.72);
  }

  100% {
    transform: scaleX(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.is-navigating::before {
    animation: none;
    transform: scaleX(0.85);
  }
}
