/* "Tape" — the call player of onimli.com. One paper slip per recording: a yellow
   play button in the ink loop language, the thread as the timeline with the yellow
   dot riding it, and tabular time. Native <input type="range"> keeps seeking
   accessible; tape.js only wires play/pause and the clock. */
.tapes { display: grid; gap: 14px; margin: 18px 0 18px; }
.tapes__lead { margin: 0 0 4px; font-size: 1rem; line-height: 1.65; }
.tape {
  --tape-ink: #171612;
  --tape-paper: #fffaf0;
  --tape-yellow: #ffe81a;
  --tape-p: 0%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 6px 16px;
  align-items: center;
  margin: 0;
  padding: 14px 16px 14px 14px;
  color: var(--tape-ink);
  background: var(--tape-paper);
  border: 1px solid rgb(23 22 18 / 0.55);
  border-radius: 3px 8px 4px 7px;
  box-shadow: 0 10px 22px -12px rgb(23 22 18 / 0.28);
}
.tape__play {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: var(--tape-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
}
/* The yellow disc lives on a pseudo-element: Safari 27 paints native button
   backgrounds over author colours in some contexts, the pseudo-layer is immune. */
.tape__play::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  box-sizing: border-box;
  background: var(--tape-yellow);
  border: 2.5px solid var(--tape-ink);
  border-radius: 50%;
  box-shadow: -2px 2px 0 var(--tape-ink);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.tape__play:hover::before { transform: translate(1px, -1px); box-shadow: -3px 3px 0 var(--tape-ink); }
.tape__play:active::before { transform: translate(-1px, 1px); box-shadow: -1px 1px 0 var(--tape-ink); }
.tape__play:focus-visible { outline: 3px solid #3156c7; outline-offset: 3px; }
.tape__play svg { width: 22px; height: 22px; fill: currentColor; }
.tape__play .tape__icon-pause { display: none; }
.tape.is-playing .tape__play .tape__icon-play { display: none; }
.tape.is-playing .tape__play .tape__icon-pause { display: block; }
.tape__title {
  grid-column: 2;
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: pretty;
}
.tape__title small {
  display: block;
  margin-top: 2px;
  color: #514a3e;
  font-size: 0.875rem;
  font-weight: 400;
}
.tape__line {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  direction: ltr;
}
/* The timeline is the thread: an ink line that fills as the call plays, with the
   yellow dot as the playhead. */
.tape__seek {
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.tape__seek:focus-visible { outline: 3px solid #3156c7; outline-offset: 2px; border-radius: 4px; }
.tape__seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--tape-ink) var(--tape-p), rgb(23 22 18 / 0.22) var(--tape-p));
}
.tape__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6.5px;
  background: var(--tape-yellow);
  border: 2.5px solid var(--tape-ink);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--tape-paper);
}
.tape__seek::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--tape-ink) var(--tape-p), rgb(23 22 18 / 0.22) var(--tape-p));
}
.tape__seek::-moz-range-thumb {
  width: 11px;
  height: 11px;
  background: var(--tape-yellow);
  border: 2.5px solid var(--tape-ink);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--tape-paper);
}
.tape__time {
  color: #514a3e;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tape__time b { color: var(--tape-ink); font-weight: 600; }
.tape audio { display: none; }
.tape__note {
  grid-column: 2;
  margin: 0;
  color: #514a3e;
  font-size: 0.875rem;
  line-height: 1.5;
}
@media (max-width: 600px) {
  .tape { grid-template-columns: 48px minmax(0, 1fr); gap: 6px 12px; padding: 12px 12px 12px 10px; }
  .tape__play { width: 46px; height: 46px; }
  .tape__title { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tape__play::before { transition: none; }
}
