:root {
  --paper: #ffffff;
  --ink: #111214;
  --soft: #8a8b91;
  --line: rgba(17, 18, 20, .11);
  --accent: #e8412c;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.reel {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 999px;
  touch-action: pan-y;
  max-width: 100%;
}
.reel:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
/* the pill: GSAP scales this element, the CSS draws it */
.reel__body {
  --edge: var(--line);
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.6vmin, 13px);
  height: clamp(52px, 9vmin, 62px);
  padding: 0 clamp(18px, 3.2vmin, 24px) 0 clamp(8px, 1.4vmin, 11px);
  border-radius: 999px;
  background: var(--paper);
  box-shadow:
    0 0 0 1px var(--edge),
    0 1px 0 rgba(255,255,255,.9) inset,
    0 14px 28px -18px rgba(17,18,20,.34),
    0 2px 5px -3px rgba(17,18,20,.16);
  will-change: transform;
}
/* everything that follows the finger lives in a layer clipped by the pill's own curve */
.reel__track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.reel__wash {
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.reel__wash--played { background: rgba(232, 65, 44, .085); }
.reel__wash--peek { background: rgba(17, 18, 20, .035); }
.reel__ticks { position: absolute; inset: 0; }
.reel__tick {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 6px;
  margin-left: -.5px;
  background: rgba(17, 18, 20, .16);
  transform-origin: 50% 100%;
}
.reel__head {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  opacity: 0;
}
.reel__line {
  position: absolute;
  left: -1px;
  bottom: 0;
  height: 26%;
  width: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transform-origin: 50% 100%;
}
.reel__play {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(36px, 6.2vmin, 42px);
  height: clamp(36px, 6.2vmin, 42px);
  flex: none;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 6px 14px -8px rgba(17,18,20,.6), 0 1px 0 rgba(255,255,255,.14) inset;
}
.reel__play svg { width: 62%; height: 62%; display: block; overflow: visible; }
.reel__play path { fill: #ffffff; stroke: #ffffff; stroke-width: .9; stroke-linejoin: round; }
.reel__label {
  position: relative;
  display: grid;
  height: 1.25em;
  font-size: clamp(15px, 2.7vmin, 19px);
  line-height: 1.25;
  clip-path: inset(0 -16px);
}
.reel__word {
  grid-area: 1 / 1;
  display: block;
  white-space: nowrap;
  width: max-content;
  letter-spacing: -0.005em;
  font-variation-settings: 'wght' 560, 'wdth' 100;
  will-change: transform;
}
.reel__rule {
  width: 1px;
  height: 1.1em;
  font-size: clamp(15px, 2.7vmin, 19px);
  background: var(--edge);
  flex: none;
}
.reel__time {
  position: relative;
  display: flex;
  align-items: baseline;
  font-size: clamp(15px, 2.7vmin, 19px);
  line-height: 1.25;
  font-variation-settings: 'wght' 560, 'wdth' 88;
  color: var(--ink);
  white-space: nowrap;
}
/* every digit in a slot of the same width: the timecode never wobbles while the frames run */
.reel__digit { display: inline-block; width: .6em; text-align: center; }
.reel__colon { display: inline-block; width: .3em; text-align: center; color: var(--soft); }
.reel__frames {
  display: inline-flex;
  overflow: hidden;
  color: var(--soft);
  font-size: .78em;
  width: 0;
}
