:root {
  color-scheme: light;
  --ink: #ffffff;
  --muted: #c6f2ff;
  --paper: #00b4ff;
  --panel: #0788c7;
  --panel-deep: #087eb7;
  --line: #ffffff;
  --shadow: 0 0 0 2px rgb(5 94 152 / 38%), 8px 8px 0 rgb(0 94 165 / 42%);
  --lime: #41d069;
  --cyan: #00b4ff;
  --yellow: #fff94f;
  --purple: #c875df;
  --blue-shadow: #056aa7;
  --radius: 8px;
  font-family:
    Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.masthead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--purple);
  border-bottom: 4px solid #3af06d;
}

.masthead::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  height: 10px;
  content: "";
  background:
    linear-gradient(90deg, var(--yellow), #33ee78 36%, var(--cyan) 68%, var(--purple)),
    repeating-linear-gradient(
    90deg,
    rgb(255 255 255 / 80%) 0 18px,
    transparent 18px 34px
  );
}

.masthead__inner {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 1240px;
  min-height: 168px;
  padding: 34px 24px 32px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 0 var(--blue-shadow);
}

h1 {
  max-width: 980px;
  margin: 0;
  color: var(--yellow);
  font-size: 5.5rem;
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 3px 3px 0 var(--blue-shadow), 5px 5px 0 rgb(0 0 0 / 24%);
}

.masthead__side {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.home-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
  background: #3bd468;
  border: 3px solid #fff;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--blue-shadow);
  text-shadow: 1px 1px 0 var(--blue-shadow);
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--yellow);
  background: #0e78b3;
  outline: 0;
  transform: translate(-1px, -1px);
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 22px auto 70px;
}

.wiki-gif-decorations {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.wiki-gif-sprite {
  position: absolute;
  display: block;
  width: var(--wiki-gif-size, 78px);
  max-width: 12vw;
  opacity: 0.92;
  filter: drop-shadow(3px 4px 0 rgb(5 106 167 / 62%));
  transform: rotate(0deg);
  transform-origin: center;
  will-change: transform;
}

.wiki-gif-sprite img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  animation: wiki-gif-float 4.8s ease-in-out infinite;
  animation-delay: var(--wiki-gif-delay, 0s);
}

@keyframes wiki-gif-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-12px) scale(1.05);
  }
}

.toolbar,
.results-head {
  border: 3px solid #fff;
  box-shadow: var(--shadow);
}

.results-head h2,
.empty-state h2 {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--blue-shadow);
}

#resultsMeta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 44px;
  color: #fff;
  background: #0e78b3;
  border: 2px solid #fff;
  border-radius: 6px;
}

.search-box input::placeholder {
  color: rgb(255 255 255 / 72%);
}

.view-toggle button {
  min-height: 44px;
  color: #fff;
  font-weight: 900;
  text-shadow: 1px 1px 0 var(--blue-shadow);
  background: var(--lime);
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 20%);
}

.toolbar {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) minmax(170px, 220px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-top: 0;
  color: #fff;
  background: var(--panel-deep);
  border-radius: var(--radius);
}

.search-box {
  position: relative;
  display: block;
}

.search-box__icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translateY(-55%);
}

.search-box__icon::after {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  content: "";
  background: #fff;
  transform: rotate(45deg);
  transform-origin: center;
}

.search-box input {
  padding: 0 12px 0 40px;
}

.select-box {
  display: grid;
  gap: 4px;
}

.select-box span {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 1px 1px 0 var(--blue-shadow);
}

.select-box select {
  padding: 0 10px;
  appearance: auto;
}

.view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 8px;
}

.view-toggle button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.view-toggle button[aria-pressed="false"] {
  color: #fff;
  background: #0e78b3;
}

.icon-grid,
.icon-list {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.icon-grid {
  background:
    linear-gradient(#fff 0 0) 0 0 / 6px 6px no-repeat,
    linear-gradient(#fff 0 0) 9px 0 / 6px 6px no-repeat,
    linear-gradient(#fff 0 0) 0 9px / 6px 6px no-repeat,
    linear-gradient(#fff 0 0) 9px 9px / 6px 6px no-repeat;
}

.icon-list {
  background:
    linear-gradient(#fff 0 0) 0 1px / 15px 3px no-repeat,
    linear-gradient(#fff 0 0) 0 6px / 15px 3px no-repeat,
    linear-gradient(#fff 0 0) 0 11px / 15px 3px no-repeat;
}

.results-head {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  margin-top: 18px;
  color: #fff;
  background: var(--panel);
  border-radius: var(--radius);
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.release-grid.is-list {
  grid-template-columns: 1fr;
}

.release-card {
  position: relative;
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  background: var(--panel-deep);
  border: 3px solid #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.release-grid.is-list .release-card {
  grid-template-columns: minmax(130px, 190px) 1fr;
}

.cover-link,
.cover-static {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  align-self: start;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--panel-deep);
  isolation: isolate;
  border-bottom: 3px solid #fff;
}

.cover-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.release-grid.is-list .cover-wrap {
  border-right: 3px solid #fff;
  border-bottom: 0;
}

.cover-wrap img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.cover-link:hover .cover-wrap img,
.cover-static:hover .cover-wrap img {
  animation: cover-zoom-loop 2.8s cubic-bezier(0.65, 0, 0.18, 1) infinite;
}

.cover-wrap img + .cover-fallback {
  display: none;
}

.cover-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  padding: 14px;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, hsl(var(--cover-hue) 90% 56%), #0b82bd 72%),
    #0b82bd;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.cover-link:hover .cover-fallback,
.cover-static:hover .cover-fallback {
  animation: cover-zoom-loop 2.8s cubic-bezier(0.65, 0, 0.18, 1) infinite;
}

@keyframes cover-zoom-loop {
  0% {
    transform: scale(1);
  }

  48% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

.cover-fallback::before {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  content: "";
  border: 2px solid rgb(255 255 255 / 86%);
}

.cover-fallback span {
  z-index: 1;
  max-width: 100%;
  font-size: 3rem;
  font-weight: 950;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--blue-shadow);
}

.release-body {
  display: grid;
  grid-template-rows: 26px 2.8em 1.25em 1.25em auto auto;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  overflow: hidden;
}

.catalog-code {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 1px 1px 0 var(--blue-shadow);
}

.pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 1px 1px 0 var(--blue-shadow);
  background: #0e78b3;
  border: 2px solid #fff;
  border-radius: 999px;
}

.release-card h2 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--yellow);
  font-size: 1.2rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 0 var(--blue-shadow);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.new-mark {
  width: 54px;
  height: auto;
  margin-left: auto;
  image-rendering: pixelated;
  filter: brightness(1.35) saturate(1.65) contrast(1.08) drop-shadow(1px 1px 0 rgb(0 0 0 / 36%));
  pointer-events: none;
}

.release-artist {
  margin: 0;
  color: #fff;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.release-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
  min-height: 1.25em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li {
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #0e78b3;
  border: 1px solid #fff;
  border-radius: 999px;
}

.empty-state {
  padding: 40px 18px;
  margin-top: 18px;
  text-align: center;
  color: #fff;
  background: var(--panel);
  border: 3px dashed #fff;
  border-radius: var(--radius);
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
}

.load-sentinel {
  min-height: 48px;
  padding: 14px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .wiki-gif-sprite,
  .wiki-gif-sprite img,
  .cover-wrap img,
  .cover-fallback {
    animation: none;
    transition: none;
    transform: none;
    will-change: auto;
  }
}

@media (max-width: 880px) {
  .masthead__inner,
  .toolbar,
  .results-head {
    grid-template-columns: 1fr;
  }

  .masthead__inner {
    display: grid;
  }

  .masthead__side {
    justify-items: start;
  }

  h1 {
    font-size: 4.6rem;
  }

  .toolbar {
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .wiki-gif-sprite {
    width: calc(var(--wiki-gif-size, 72px) * 0.72);
    max-width: 17vw;
    opacity: 0.74;
  }

  .app-shell {
    width: min(100% - 20px, 1240px);
    margin-top: 14px;
  }

  .masthead__inner {
    min-height: 168px;
    padding: 44px 14px 20px;
  }

  .toolbar {
    position: relative;
    top: auto;
    z-index: 2;
  }

  .release-grid.is-list .release-card {
    grid-template-columns: 1fr;
  }

  .release-grid.is-list .cover-wrap {
    border-right: 0;
    border-bottom: 3px solid #fff;
  }

  .results-head {
    display: grid;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 3rem;
  }

  .cover-fallback span {
    font-size: 2.55rem;
  }
}
