/* One masked vertical step, following the user's rolling-text reference. */
.time-roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.time-roll span {
  display: block;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.time-roll .time-roll__track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  opacity: 0;
}
.time-roll__track > span { height: 50%; }
.time-roll.is-rolling {
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.time-roll.is-rolling .time-roll__value { visibility: hidden; }
.time-roll.is-rolling .time-roll__track {
  opacity: 1;
  animation: ready-number-roll 900ms both;
}
@keyframes ready-number-roll {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  76% { transform: translateY(-51%); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  100% { transform: translateY(-50%); }
}

/* Separate canvases let the selection open without moving the sound below it. */
.editing-visual__layers { position: relative; }
.editing-visual__layers [data-editing-selection] {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.editing-selection-edge {
  position: absolute;
  display: none;
  pointer-events: none;
  border-inline: 1px solid #ba819c;
  background: #a6537710;
}

/* Closing retains the open content until its height transition finishes. */
.question-answer { display: flow-root; }
.questions summary .icon {
  transition: transform 260ms cubic-bezier(.22, 1, .36, 1), color 180ms;
}
.questions details[data-closing] summary .icon { transform: rotate(0); }

@media (prefers-reduced-motion: reduce) {
  .time-roll.is-rolling { -webkit-mask-image: none; mask-image: none; }
  .time-roll.is-rolling .time-roll__value { visibility: visible; }
  .time-roll.is-rolling .time-roll__track { animation: none; opacity: 0; }
  .questions summary .icon { transition: none; }
}
