/* Sidebar avatar carousel: anime portrait(s) first, then the real photo.
   Slides move left/right inside the theme's oval crop; arrows and dots on wide screens,
   tap or swipe on narrow ones. */
.avatar-carousel { position: relative; width: 36px; }
.avatar-carousel__frame { position: relative; }
.avatar-carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  clip-path: ellipse(50% 50% at 50% 50%);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  touch-action: pan-y;
}
.avatar-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.author__avatar .avatar-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  padding: 0;
  border: 0;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}
.avatar-carousel__arrow,
.avatar-carousel__dots { display: none; }

@media (min-width: 925px) {
  .avatar-carousel { width: 175px; max-width: 100%; }
  .avatar-carousel__frame {
    padding: 5px;
    border: 1px solid var(--global-border-color);
    border-radius: 50%;
  }
  .avatar-carousel__arrow {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    padding: 0;
    border: 1px solid var(--global-border-color);
    border-radius: 50%;
    background: var(--global-bg-color, #fff);
    color: var(--global-text-color, #333);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease;
  }
  .avatar-carousel__arrow svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .avatar-carousel__arrow--prev { left: -4px; }
  .avatar-carousel__arrow--next { right: -4px; }
  .avatar-carousel:hover .avatar-carousel__arrow,
  .avatar-carousel__arrow:focus-visible { opacity: 1; }
  .avatar-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
  }
  .avatar-carousel__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--global-border-color);
    cursor: pointer;
  }
  .avatar-carousel__dot[aria-current="true"] { background: var(--global-text-color-light, #7a8288); }
}
.avatar-carousel button:focus-visible { outline: 2px solid var(--global-link-color, #52adc8); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .avatar-carousel__track { transition: none; }
}
