.tape-player {
  width: 100%;
  max-width: 440px;
  max-height: 440px;
  /* aspect-ratio: 2 / 3; */
  aspect-ratio: 1 / 1;
  background: #eee;
  position: relative;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.tape-player[data-ratio="3:2"] {
  aspect-ratio: 3 / 2;
}

.tape-deck {
  position: relative;
  width: 100%;
  height: 62%;
}

.tape-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tape-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.tape-now {
  padding: 10px 12px 2px;
  text-align: center;
}

.tape-now-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 20px;
}

.tape-now-artist {
  font-size: 12px;
  opacity: .75;
  min-height: 16px;
}

.tape-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
}

.tape-time {
  font-size: 12px;
  width: 44px;
  text-align: center;
  opacity: .75;
}

.tape-seek {
  flex: 1;
}

.tape-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 10px 14px;
}

.tape-controls button {
  cursor: pointer;
}

.tape-ctrl-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0px solid rgba(0, 0, 0, .12) !important;
  background-color: #fff !important;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 42px 42px;
  border-radius: 42px !important;
  width: 42px;
  height: 42px;
  padding: 0 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, border-color .15s ease;
  overflow: hidden;
  position: relative;
}

.tape-ctrl-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}

.tape-ctrl-btn:active {
  transform: translateY(0);
}

.tape-ctrl-btn.is-on {
  background-color: #f7e8a5 !important;
  border-color: #f7e8a5;
  box-shadow: 0 0 0 3px rgba(228, 203, 90, 0.28), 0 8px 18px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}

.tape-ctrl-btn>span {
  display: block;
  width: 100%;
  height: 100%;
  text-indent: -9999px;
  overflow: hidden;
}

.tape-ctrl-label {
  position: absolute;
  inset: 0;
}

.tape-ctrl-stop-label {
  display: none;
}

.tape-ctrl-prev {
  background-image: url('../img/tape_prev.svg');
}

.tape-ctrl-next {
  background-image: url('../img/tape_next.svg');
}

.tape-ctrl-list {
  background-image: url('../img/tape_list.svg');
}

.tape-ctrl-timer {
  background-image: url('../img/tape_timer.svg');
}

.tape-ctrl-loop {
  background-image: url('../img/tape_loop.svg');
}

.tape-ctrl-shuffle {
  background-image: url('../img/tape_shuffle.svg');
}

.tape-ctrl-stop {
  background-image: url('../img/tape_stop.svg');
}

.tape-ctrl-play {
  background-image: url('../img/tape_play.svg');
}

.tape-player.is-playing .tape-ctrl-play,
.tape-mini.is-playing .tape-ctrl-play {
  background-image: url('../img/tape_stop.svg');
}

.tape-player.is-playing .tape-ctrl-play-label,
.tape-mini.is-playing .tape-ctrl-play-label {
  display: none;
}

.tape-player.is-playing .tape-ctrl-stop-label,
.tape-mini.is-playing .tape-ctrl-stop-label {
  display: block;
}

/*
.tape-controls .tape-ctrl-btn:focus,
.tape-controls .tape-ctrl-btn:focus-visible {
  outline: none !important;
}

.tape-controls .tape-ctrl-btn::-moz-focus-inner {
  border: 0;
} */

.tape-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 20;
}

.tape-popup {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 60%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, .25);
  z-index: 30;
  overflow: hidden;
}

.tape-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.tape-popup-title {
  font-weight: 600;
}

.tape-popup-close {
  border: 0;
  border-radius: 30px !important;
  padding: 12px !important;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}

.tape-popup-body {
  overflow: auto;
  max-height: calc(60vh - 52px);
}

.tape-list-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  cursor: pointer;
}

.tape-list-item.is-active {
  background: rgba(0, 0, 0, .06);
}

.tape-list-title {
  font-weight: 600;
  font-size: 14px;
}

.tape-list-artist {
  font-size: 12px;
  opacity: .75;
}

.tape-timer-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.tape-timer-btn,
.tape-timer-apply,
.tape-timer-cancel {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.tape-timer-btn,
.tape-timer-apply,
.tape-timer-cancel {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.tape-timer-btn {
  background: #fff !important;
  border-radius: 30px !important;
  padding: 10px 12px !important;
}

.tape-timer-custom-row {
  display: flex;
  gap: 8px;
}

.tape-timer-custom {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 10px;
}

.tape-timer-badge {
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .12);
  line-height: 1;
  opacity: .85;
}

.tape-timer-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tape-timer-remaining {
  font-size: 12px;
  opacity: .8;
  padding: 2px 2px;
}

.tape-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
  max-width: 440px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.tape-mini-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.tape-mini-meta {
  flex: 1;
  min-width: 0;
}

.tape-mini-title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-mini-artist {
  font-size: 12px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-mini-status {
  font-size: 12px;
  opacity: .65;
  margin-top: 2px;
}

.tape-mini-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tape-mini-timer {
  font-size: 12px;
  opacity: .85;
}

.tape-yap-indicator {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(260px, calc(100% - 28px));
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(17, 17, 17, .92);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  cursor: pointer;
}

.tape-yap-indicator[hidden] {
  display: none !important;
}

.tape-yap-indicator:hover {
  transform: translateY(-1px);
}

.tape-yap-indicator-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff url('../img/tape_play.svg') no-repeat center center / 20px 20px;
  flex: 0 0 auto;
}

.tape-yap-indicator.is-playing .tape-yap-indicator-icon {
  background-image: url('../img/tape_stop.svg');
}

.tape-yap-indicator-text {
  min-width: 0;
}

.tape-yap-indicator-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tape-yap-indicator-status {
  font-size: 11px;
  opacity: .78;
  margin-top: 2px;
}