.music-player {
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 48px));
  margin: 0;
  text-align: center;
  transform: translateX(-50%);
}

.mp3-device {
  position: relative;
  width: 100%;
  aspect-ratio: 1945 / 463;
}

.mp3-render {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 5px 4px #27273a24);
}

.mp3-main,
.mp3-side {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #414552;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/* Coordinates follow the unscaled rendered image, including its clear margin. */
.mp3-main {
  left: 19.54%;
  top: 48.38%;
  width: 10.4%;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.mp3-main svg {
  width: 17px;
  height: 17px;
  filter: drop-shadow(0 1px #ffffff7a);
}

.mp3-main:hover:not(:disabled) {
  color: #182646;
}

.mp3-main:active:not(:disabled) {
  background: #17234216;
}

.mp3-main:disabled,
.mp3-side:disabled {
  cursor: default;
}

.mp3-main:disabled svg,
.mp3-side:disabled svg {
  opacity: 0.5;
}

.mp3-side {
  top: 92%;
  width: 6.7%;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
}

.mp3-restart {
  left: 41.13%;
}

.mp3-mute {
  left: 51%;
}

.mp3-mute[aria-pressed="true"] {
  color: #071022;
}

.mp3-side svg {
  filter: drop-shadow(0 1px #ffffff70);
}

.mp3-screen {
  position: absolute;
  left: 36.8%;
  top: 29.7%;
  display: grid;
  width: 31.3%;
  height: 31.5%;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 45% 55%;
  align-items: center;
  column-gap: 5%;
  padding: 1px 2px;
  color: #08307b;
  font: clamp(6px, 1.75vw, 8px)/1 "Lucida Console", "Courier New", monospace;
  text-align: left;
}

.mp3-readout {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  white-space: nowrap;
}

.mp3-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp3-readout > span:last-child {
  flex: 0 0 auto;
}

.mp3-state {
  display: none;
}

.mp3-seek,
.mp3-volume {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 14px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.mp3-seek:disabled {
  opacity: 0.5;
  cursor: default;
}

.mp3-seek::-webkit-slider-runnable-track,
.mp3-volume::-webkit-slider-runnable-track {
  height: 2px;
  background: #0c367d6b;
}

.mp3-seek::-webkit-slider-thumb,
.mp3-volume::-webkit-slider-thumb {
  appearance: none;
  width: 4px;
  height: 5px;
  margin-top: -1.5px;
  border: 0;
  border-radius: 0;
  background: #073775;
}

.mp3-seek::-moz-range-track,
.mp3-volume::-moz-range-track {
  height: 2px;
  background: #0c367d6b;
}

.mp3-seek::-moz-range-thumb,
.mp3-volume::-moz-range-thumb {
  width: 4px;
  height: 5px;
  border: 0;
  border-radius: 0;
  background: #073775;
}

.music-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.mp3-device button:focus-visible,
.mp3-device input:focus-visible {
  outline: 2px solid #335cce;
  outline-offset: 3px;
}

@media (max-height: 560px) {
  body {
    padding-bottom: 24px;
  }

  .music-player {
    position: static;
    width: min(400px, 100%);
    margin-top: 8px;
    transform: none;
  }
}
