.pager {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: fit-content;
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.pager[hidden] {
  display: none;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.page-size-control select {
  width: auto;
  min-width: 74px;
}

.page-timeline {
  position: fixed;
  top: 214px;
  right: max(2px, calc((100vw - 1180px) / 2 - 18px));
  z-index: 12;
  display: grid;
  gap: 12px;
  width: 18px;
  min-width: 18px;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-standard) ease;
}

.page-timeline:hover,
.page-timeline:focus-within,
.page-timeline.is-active {
  opacity: 1;
}

.page-timeline::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  right: 9px;
  width: 2px;
  background: var(--line);
  content: "";
  z-index: -1;
  border-radius: 2px;
}

.page-timeline button {
  position: relative;
  left: -4px;
  display: grid;
  justify-self: center;
  place-items: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  pointer-events: auto;
  transition: color 0.2s ease;
  box-shadow: none;
}

.page-timeline-dot {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  cursor: pointer;
}

.page-timeline-label {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: calc(100% + 6px);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-solid);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  opacity: 0;
  transform: translate(3px, -50%);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.page-timeline button:hover .page-timeline-label,
.page-timeline button:focus-visible .page-timeline-label {
  opacity: 1;
  transform: translate(0, -50%);
}

.page-timeline button:hover,
.page-timeline button:focus-visible {
  background: color-mix(in srgb, var(--accent-soft) 72%, transparent);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.page-timeline button:hover .page-timeline-dot,
.page-timeline button:focus-visible .page-timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  transform: scale(1.3);
}

