/* Send-time wheel, shared by the signup form (index.html) and the
   preferences page (/api/preferences). Expects the site palette vars, with
   fallbacks so the preferences page renders the same without them. */
.tw{
  --tw-row:44px;
  --tw-rows:5;
  position:relative;
  width:100%;
  max-width:260px;
  margin:0 auto;
  user-select:none;
  -webkit-user-select:none;
}
.tw-scroller{
  position:relative;
  height:calc(var(--tw-row) * var(--tw-rows));
  overflow-y:scroll;
  scroll-snap-type:y mandatory;
  overscroll-behavior:contain;
  scrollbar-width:none;
  cursor:grab;
  touch-action:pan-y;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0%, #000 34%, #000 66%, transparent 100%);
          mask-image:linear-gradient(to bottom, transparent 0%, #000 34%, #000 66%, transparent 100%);
}
.tw-scroller::-webkit-scrollbar{ display:none; }
.tw.dragging .tw-scroller{ cursor:grabbing; scroll-snap-type:none; }
.tw-list{
  list-style:none;
  margin:0;
  padding:calc(var(--tw-row) * (var(--tw-rows) - 1) / 2) 0;
}
.tw-item{
  height:var(--tw-row);
  line-height:var(--tw-row);
  text-align:center;
  scroll-snap-align:center;
  font-family:var(--font-head, 'Fraunces', Georgia, serif);
  font-weight:500;
  font-size:17px;
  color:var(--ink, #386641);
  opacity:0.4;
  transition:opacity .15s, transform .15s;
  cursor:pointer;
}
.tw-item.near{ opacity:0.65; }
.tw-item.on{ opacity:1; font-weight:600; color:var(--ink-strong, #16241a); transform:scale(1.08); }

/* the selection band: two hairlines, with a small rust node at each end,
   like a signal crossing a synapse */
.tw-band{
  position:absolute;
  left:0; right:0;
  top:calc(var(--tw-row) * (var(--tw-rows) - 1) / 2);
  height:var(--tw-row);
  pointer-events:none;
  border-top:1px solid var(--accent, #6a994e);
  border-bottom:1px solid var(--accent, #6a994e);
  background:rgba(167,201,87,0.16);
  border-radius:4px;
}
.tw-band::before,
.tw-band::after{
  content:"";
  position:absolute;
  top:50%;
  width:7px; height:7px;
  margin-top:-3.5px;
  border-radius:50%;
  background:var(--cta, #bc4749);
}
.tw-band::before{ left:10px; }
.tw-band::after{ right:10px; }

.tw.focused .tw-band{ outline:2px solid var(--cta, #bc4749); outline-offset:3px; }

/* the real control: visually hidden, still focusable and read by
   assistive tech; the wheel above mirrors it */
.tw-native{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

.tw-zone{
  margin-top:10px;
  text-align:center;
  font-family:var(--font-body, 'Inter', sans-serif);
  font-size:12px;
  color:var(--ink, #386641);
  opacity:0.8;
}

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