/* 闹钟式滚轮选择器（零依赖）
 * 关键尺寸：整体 220px，每项 44px，上下留白 88px = (220 - 44) / 2
 * 吸附：.wheel-scroll 开启 y mandatory，.wheel-item 以 center 对齐
 */
.wheel,
.wheel * {
  box-sizing: border-box;
}

.wheel {
  --wheel-ink: #3B3733;
  --wheel-muted: #756D62;
  --wheel-line: #E7E0D5;
  --wheel-band: #FAF6EF;
  --wheel-paper: #FFFFFF;

  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--wheel-paper);
  box-shadow: inset 0 0 0 1px var(--wheel-line), 0 1px 3px rgba(0, 0, 0, .04);
  color: var(--wheel-ink);
  -webkit-user-select: none;
  user-select: none;
}

/* 中间高亮条：在滚动内容之下，浅色底 + 上下细线 */
.wheel-band {
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  top: 88px;
  height: 44px;
  border-top: 1px solid var(--wheel-line);
  border-bottom: 1px solid var(--wheel-line);
  background: var(--wheel-band);
  pointer-events: none;
}

/* 滚动区：上下 padding 让第一项/最后一项也能停在中间 */
.wheel-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 88px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;

  /* 上下渐隐；中心 36%–64%（约 79–141px）完全不透明，保证高亮行清晰 */
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0, 0, 0, .18) 12%,
    #000 36%,
    #000 64%,
    rgba(0, 0, 0, .18) 88%,
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0%,
    rgba(0, 0, 0, .18) 12%,
    #000 36%,
    #000 64%,
    rgba(0, 0, 0, .18) 88%,
    transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.wheel-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.wheel-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  height: 44px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1;
  color: var(--wheel-muted);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .16s ease;
}

.wheel-item[aria-selected="true"] {
  color: var(--wheel-ink);
  font-weight: 700;
}

.wheel-unit {
  font-size: .75rem;
  font-weight: 500;
  color: inherit;
}

.wheel:focus-within {
  box-shadow: inset 0 0 0 2px rgba(59, 55, 51, .55), 0 1px 3px rgba(0, 0, 0, .04);
}

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