.scroll-controls {
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  background: #191919f5;
  border: 1px solid #666;
  border-radius: 6px;
  box-shadow: 0 2px 8px #0004;
  color: white;
  font: 600 .875rem/1.2 Helvetica, Arial, sans-serif;
}
.scroll-controls button {
  cursor: pointer;
  font: inherit;
  background: transparent;
  color: inherit;
  border: 0;
  min-height: 44px;
}
.scroll-controls button { padding: 0 10px; }
.speed-label { border-top:1px solid #555; text-align:center; padding-top:5px; }
#scroll-speed {
  position:relative;
  height:72px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scroll-snap-type:y mandatory;
  scrollbar-width:none;
  touch-action:pan-y;
  user-select:none;
  text-align:center;
  font-variant-numeric:tabular-nums;
  background:linear-gradient(to bottom, transparent 24px, #ffffff12 24px 48px, transparent 48px);
}
#scroll-speed::-webkit-scrollbar {display:none}
#scroll-speed::before, #scroll-speed::after {content:'';display:block;height:24px}
#scroll-speed span {display:block;height:24px;line-height:24px;scroll-snap-align:center;color:#aaa;cursor:pointer}
#scroll-speed .selected {color:white;font-weight:700}
.scroll-controls :focus-visible { outline: 2px solid white; outline-offset: -3px; }
@media (max-width: 600px) {
  .scroll-controls { top:auto; bottom:max(12px, env(safe-area-inset-bottom)); transform:none; }
  footer { padding-bottom: 162px; }
}
