.alphabet-indexed {
  position: relative;
  padding-left: calc(var(--s-6) + var(--s-3));
}
.alphabet-index {
  position: fixed;
  z-index: 30;
  transform: translateY(-50%);
  width: 28px;
}
.alphabet-rail {
  position: relative;
  height: min(520px, calc(100dvh - var(--header-reserve, 68px) - 64px));
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  touch-action: none;
  user-select: none;
  cursor: ns-resize;
  border-radius: var(--r-full);
}
.alphabet-rail:focus,
.alphabet-rail:focus-visible {
  outline: none;
  box-shadow: none;
}
.alphabet-tick {
  display: grid;
  align-items: center;
  justify-items: start;
  flex: 1;
  width: 100%;
}
.alphabet-tick::before {
  content: '';
  width: 6px;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--text-3);
  opacity: 0.45;
  transition:
    width var(--t-fast),
    background var(--t-fast),
    opacity var(--t-fast);
}
.alphabet-tick.is-active::before {
  height: 3px;
  background: var(--accent);
  opacity: 1;
}
.alphabet-bubble {
  position: absolute;
  left: 40px;
  transform: translateY(-50%) scale(0.85);
  opacity: 0;
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 56px;
  height: 56px;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1;
  padding-inline: var(--s-2);
  border-radius: var(--r-full);
  background: var(--glass-strong);
  backdrop-filter: var(--blur);
  box-shadow: var(--glass-edge), var(--shadow-2);
  color: var(--text);
  font-size: var(--fs-xl);
  font-weight: 600;
  pointer-events: none;
  transition:
    transform var(--t-fast),
    opacity var(--t-fast);
}
.alphabet-rail.is-hovered .alphabet-bubble,
.alphabet-rail.is-scrubbing .alphabet-bubble,
.alphabet-rail:focus-visible .alphabet-bubble {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .alphabet-tick::before,
  .alphabet-bubble {
    transition: none;
  }
}

.alphabet-tick.is-near::before {
  width: 12px;
  opacity: 0.7;
}
.alphabet-tick.is-preview::before {
  width: 24px;
  background: var(--text);
  opacity: 1;
}
body:has(.sidebar.open) .alphabet-index {
  visibility: hidden;
  pointer-events: none;
}
