/* ICON-01: approved LP1 category identifiers in LP3's existing paper links.
   Preserve: red / ink / cream, grid order, tilted edges, arrows and focus.
   DESIGN_VARIANCE=8, MOTION_INTENSITY=1, VISUAL_DENSITY=4.
   Original logo pixels are not altered; multiply integrates their white paper.
   Scope every rule to this navigation, never to the approved product labels. */
.category-nav--icons > a,
.category-nav--icons > a:nth-child(n+4) {
  justify-content: space-between;
  min-height: 104px;
  padding: 12px 8px 9px;
  gap: 12px;
}

.category-nav--icons .category-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  padding: 0;
  background: transparent;
  flex: 0 0 auto;
}

.category-nav--icons .category-logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 230px;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.category-nav--icons > a[href="#fate"] .category-logo img {
  max-width: 150px;
}

.category-nav--icons > a > span:last-child {
  align-items: center;
  margin-top: 0;
  padding-top: 0;
  font-size: 14px;
  line-height: 1.5;
  gap: 3px;
}

/* The original 3+2 mobile / five-column desktop grid stays unchanged. */
@media (max-width: 359px) {
  .category-nav--icons > a,
  .category-nav--icons > a:nth-child(n+4) {
    padding-inline: 6px;
  }
}

@media (min-width: 768px) {
  .category-nav--icons > a,
  .category-nav--icons > a:nth-child(n+4) {
    min-height: 118px;
    padding: 15px 12px 10px;
  }

  .category-nav--icons .category-logo {
    height: 48px;
  }
}

@media (min-width: 1024px) {
  .category-nav--icons > a,
  .category-nav--icons > a:nth-child(n+4) {
    min-height: 128px;
  }

  .category-nav--icons .category-logo {
    height: 55px;
  }
}

/* ICON-02: the four wordmark links keep their names through aria-label.
   Only remove repeated visible captions; keep the activity label and all spacing. */
.category-nav--icons > a > span.category-arrow {
  justify-content: flex-end;
}

/* ICON-03: compact horizontal paper links, approved after the ICON-02 screenshot.
   Preserve original artwork, colours, tilt, accessible names and destination order.
   Dials remain 8 / 1 / 4; no new motion or decorative illustrations. */
.category-nav.category-nav--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.category-nav.category-nav--compact > a,
.category-nav.category-nav--compact > a:nth-child(n+4) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  justify-content: normal;
  gap: 8px;
  min-height: 78px;
  padding: 10px;
  grid-column: span 2;
}

.category-nav.category-nav--compact > a:nth-child(n+4) {
  grid-column: span 3;
}

.category-nav--compact .category-logo {
  height: 40px;
}

.category-nav--compact .category-logo img {
  max-width: 240px;
  object-position: center;
}

.category-nav--compact > a[href="#pokemon"] .category-logo,
.category-nav--compact > a[href="#onepiece"] .category-logo {
  height: 50px;
}

.category-nav--compact > a > span.category-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.category-nav--compact .category-arrow b {
  font-size: 22px;
  line-height: 1;
}

.category-nav--compact .category-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.category-nav--compact .category-identity .category-logo {
  max-width: 108px;
  height: 26px;
}

.category-nav--compact .category-name {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

/* At phone widths, a three-across horizontal row would make wordmarks too small.
   Keep DOM order: two activity links, the full-width activity link, two brands. */
@media (max-width: 479px) {
  .category-nav.category-nav--compact > a {
    grid-column: span 3;
  }

  .category-nav.category-nav--compact > a:nth-child(3) {
    grid-column: span 6;
    min-height: 64px;
  }

  .category-nav--compact .category-identity {
    flex-direction: row;
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .category-nav.category-nav--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }

  .category-nav.category-nav--compact > a,
  .category-nav.category-nav--compact > a:nth-child(n+4) {
    grid-column: auto;
    min-height: 84px;
    padding: 12px 10px;
    gap: 10px;
  }

  .category-nav--compact > a[href="#pokemon"] .category-logo,
  .category-nav--compact > a[href="#onepiece"] .category-logo {
    height: 54px;
  }
}
