/* OCR-A font: see FONT-LICENSE.txt for credits and terms. */
@font-face {
  font-family: "OCR-A";
  src: url("fonts/OCRA.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  background: #000;
  color: #fff;
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 240px;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  font-family: "OCR-A", "Courier New", monospace;
}

main {
  display: grid;
  place-items: center;
  padding: 3rem 5vw;
}

h1 {
  margin: 0;
  font-family: "OCR-A", "Courier New", monospace;
  font-size: clamp(1.5rem, 10.4vw, 11rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.025em;
  text-align: center;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.player {
  width: min(46rem, 90%);
  margin: 0 auto;
  padding: 1.25rem 0 max(1.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid #353535;
}

.controls { display: flex; align-items: center; gap: 1rem; }
.track { flex: 1; min-width: 0; }
label { display: block; font-size: .7rem; color: #aaa; margin-bottom: .4rem; }
button, select, input { font: inherit; }
button, select {
  min-height: 44px;
  color: #fff;
  background: #000;
  border: 1px solid #666;
  border-radius: 0;
}
button { padding: .7rem 1rem; cursor: pointer; }
button:hover { background: #fff; color: #000; }
button:disabled { cursor: wait; color: #aaa; }
#play { align-self: flex-end; min-width: 7rem; }
select { width: 100%; padding: .6rem .5rem; text-overflow: ellipsis; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.timeline { display: flex; align-items: center; gap: .75rem; margin-top: .6rem; }
input[type="range"] { height: 26px; margin: 0; min-width: 0; accent-color: #fff; cursor: pointer; }
#seek { flex: 1; }
#volume { width: 5rem; }
.time { color: #aaa; font-size: .7rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
#mute { border: 0; padding: .5rem; font-size: .7rem; min-width: 4rem; }
.error { color: #aaa; font-size: .7rem; margin: .3rem 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
audio { width: 100%; margin-top: .7rem; }
[hidden] { display: none !important; }

@media (max-width: 480px) {
  .controls { gap: .6rem; }
  select { font-size: .8rem; }
  #play { min-width: 5.5rem; padding-inline: .6rem; }
  .timeline { flex-wrap: wrap; gap: .4rem; }
  #seek { flex-basis: calc(100% - 7rem); }
}

::selection { color: #000; background: #fff; }
