#aside-content #aside-popular-posts {
  min-width: 0;
  padding: 14px 12px 8px;
  box-shadow: none;
  transition: none;
}

#aside-popular-posts .popular-posts-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 8px;
  padding: 0;
  color: var(--efu-fontcolor);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.02em;
}

#aside-popular-posts .popular-posts-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #d84b3f;
  background: #fff0ec;
}

#aside-popular-posts .popular-posts-icon svg { width: 18px; height: 18px; }

#aside-popular-posts .popular-posts-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#aside-popular-posts .popular-post-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 7px;
  border-radius: 10px;
  color: var(--efu-fontcolor);
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}

#aside-popular-posts .popular-post-rank {
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  margin-top: 1px;
  border-radius: 8px;
  color: var(--efu-secondtext);
  background: var(--efu-secondbg);
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

#aside-popular-posts li:nth-child(1) .popular-post-rank { color: #b82b43; background: #fff0f2; }
#aside-popular-posts li:nth-child(2) .popular-post-rank { color: #a84a13; background: #fff2e6; }
#aside-popular-posts li:nth-child(3) .popular-post-rank { color: #876014; background: #fbf4df; }
#aside-popular-posts .popular-post-copy { flex: 1; min-width: 0; }

#aside-popular-posts .popular-post-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

#aside-popular-posts .popular-post-link:focus-visible { outline: 2px solid var(--efu-main); outline-offset: -2px; }
#aside-popular-posts .popular-post-link:active { color: var(--efu-main); background: var(--efu-main-op); }

@media (hover: hover) {
  #aside-popular-posts .popular-post-link:hover { color: var(--efu-main); background: var(--efu-main-op); }
}

[data-theme='dark'] #aside-popular-posts .popular-posts-icon { color: #ff9f87; background: #3b2926; }
[data-theme='dark'] #aside-popular-posts li:nth-child(1) .popular-post-rank { color: #ffafba; background: #3c222c; }
[data-theme='dark'] #aside-popular-posts li:nth-child(2) .popular-post-rank { color: #ffc390; background: #392b20; }
[data-theme='dark'] #aside-popular-posts li:nth-child(3) .popular-post-rank { color: #ebd18e; background: #35301f; }

@media (prefers-reduced-motion: reduce) {
  #aside-popular-posts .popular-post-link { transition: none; }
}

@media (prefers-contrast: more) {
  #aside-popular-posts .popular-post-link { border: 1px solid var(--efu-secondtext); }
}
