.sticky-pagination {
  position: fixed;
  top: 150px;
  right: 10px;
  background-color: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  text-align: center;
  z-index: 1000;
  padding: 3px;

  span {
    display: block;
    padding: 2px;

    &.link:hover {
      text-decoration: underline;
      cursor: pointer;
    }

    &.active { color:var(--color-green); }

    &.inactive {
      color: var(--color-neutral-200);
      pointer-events: none;
    }
  }
}

@media (max-width: 768px) {
  .sticky-pagination {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    right: auto;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
    border-left: 0;
    border-right: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 2900;
    -webkit-overflow-scrolling: touch;

    span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      min-width: 40px;
      min-height: 40px;
      padding: 0;
      border-radius: 8px;
      font-size: 16px;
      line-height: 1;

      &.active {
        color: var(--color-neutral-0);
        background-color: var(--color-green);
      }

      &.inactive {
        color: var(--color-neutral-300);
        background-color: var(--color-neutral-100);
      }
    }
  }
}
