/* 全站底部试听条。专辑页滚出解码器后，和分类、首页用的是同一条。 */

.hires-player[hidden] {
  display: none !important;
}

.hires-player {
  --played: 0%;
  --red: #D53832;
  --black: #171717;
  --surface: #FFFDFC;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--surface);
  box-shadow: none;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}

.hires-player.is-open {
  transform: translateY(0) !important;
}

.hires-player-inner {
  box-sizing: border-box;
  position: relative;
  width: min(1440px, 100%);
  max-width: 1440px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px 0 12px;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
  color: var(--surface);
  background-color: var(--black);
  border: 2px solid var(--black);
  border-bottom: 0;
  border-radius: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, rgba(255,253,252,.022) 0 1px, transparent 1px 2px, rgba(0,0,0,.08) 2px 3px, transparent 3px 5px);
  box-shadow: 0 -12px 32px -18px rgba(23, 23, 23, .6);
}

.hires-player-inner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: rgba(216, 216, 216, .15);
}

.hires-player-inner::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: var(--played, 0%);
  background: var(--red);
}

.hires-player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 248px;
  flex: none;
}

.hires-player-cover {
  width: 48px;
  height: 48px;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 253, 252, .04);
  border: 1px solid rgba(216, 216, 216, .3);
  flex: 0 0 48px;
  box-shadow: none;
}

.hires-player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hires-player-meta {
  min-width: 0;
}

.hires-player-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hires-player-artist {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(216, 216, 216, .6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hires-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
}

.hires-player-btn {
  border: 1px solid rgba(216, 216, 216, .25);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 253, 252, .06), rgba(0, 0, 0, .2));
  color: var(--surface);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

.hires-player-btn:hover {
  border-color: rgba(216, 216, 216, .6);
}

.hires-player-skip {
  width: 36px;
  height: 36px;
}

.hires-player-skip svg {
  width: 16px;
  height: 16px;
}

.hires-player-main {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--surface);
  color: var(--black);
  flex: none;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
}

.hires-player-main:hover {
  filter: none;
  background: #fff;
}

.hires-player-main svg {
  width: 18px;
  height: 18px;
}

.hires-player-main .icon-play { margin-left: 2px; }
.hires-player-main .icon-pause { display: none; }
.hires-player.is-playing .hires-player-main .icon-play { display: none; }
.hires-player.is-playing .hires-player-main .icon-pause { display: block; }

.hires-player-mute {
  width: 36px;
  height: 36px;
  color: var(--surface);
}

.hires-player-mute svg {
  width: 16px;
  height: 16px;
}

.hires-player-mute .icon-muted { display: none; }
.hires-player.is-muted .hires-player-mute .icon-vol { display: none; }
.hires-player.is-muted .hires-player-mute .icon-muted { display: block; }

.hires-player-progress {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  color: rgba(216, 216, 216, .7);
  font-variant-numeric: tabular-nums;
}

.hires-player-time {
  display: block;
  width: auto;
  white-space: nowrap;
}

.hires-player-time-end {
  text-align: right;
}

.hires-player-progress input[type="range"],
.hires-player-volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to right, var(--surface) var(--played, 0%), rgba(216, 216, 216, .18) var(--played, 0%));
  outline: none;
  cursor: pointer;
}

.hires-player-progress input[type="range"] { width: 100%; min-width: 0; }

.hires-player-volume input[type="range"] {
  background: linear-gradient(to right, var(--surface) var(--vol, 100%), rgba(216, 216, 216, .18) var(--vol, 100%));
}

.hires-player-progress input[type="range"]::-webkit-slider-thumb,
.hires-player-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 3px;
  height: 14px;
  border-radius: 0;
  background: var(--red);
  border: 0;
  box-shadow: none;
}

.hires-player-progress input[type="range"]::-moz-range-thumb,
.hires-player-volume input[type="range"]::-moz-range-thumb {
  width: 3px;
  height: 14px;
  border-radius: 0;
  background: var(--red);
  border: 0;
  box-shadow: none;
}

.hires-player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.hires-player-volume input[type="range"] {
  width: 92px;
}

.hires-player-close {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(216, 216, 216, .25);
  border-radius: 0;
  background: transparent;
  color: rgba(216, 216, 216, .8);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.hires-player-close:hover {
  color: var(--surface);
  border-color: rgba(216, 216, 216, .6);
}

.hires-player :is(button, input):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

body.hires-player-open {
  padding-bottom: 72px;
}

@media (max-width: 820px) {
  .hires-player,
  .hires-player-inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .hires-player-inner {
    height: 62px;
    gap: 8px;
    padding: 0 8px calc(0px + env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
  }
  .hires-player-info { width: auto; flex: 1; min-width: 0; }
  .hires-player-cover { width: 42px; height: 42px; flex-basis: 42px; }
  .hires-player-title { font-size: 13px; }
  .hires-player-artist { font-size: 11px; }
  .hires-player-skip { display: none; }
  .hires-player-volume { display: none; }
  .hires-player-progress { flex: 1 1 0; min-width: 0; grid-template-columns: auto minmax(0, 1fr) auto; }
  .hires-player-main { width: 40px; height: 40px; }
  .hires-player-main svg { width: 16px; height: 16px; }
  body.hires-player-open {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }
}
