.backdrop .videoBackdrop {
  display: block !important;
  opacity: 0 !important;
}

.backdrop.has-video .videoBackdrop {
  opacity: 1 !important;
}

.app.is-echo-show .backdrop .videoBackdrop,
.app.is-echo-show .backdrop.has-video .videoBackdrop {
  display: none !important;
  opacity: 0 !important;
}

@media (hover: hover) and (pointer: fine) and (min-width: 821px) {
  .app.has-auto-hide-dock .dock,
  .app.has-auto-hide-dock .dock.is-revealed,
  .app.has-auto-hide-dock .dock:focus-within {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(-50%) !important;
    will-change: auto;
  }

  .app.has-auto-hide-dock .dockRevealZone {
    display: none !important;
  }
}

.backdrop > img,
.app.is-webtv .backdrop > img {
  visibility: visible !important;
  filter: saturate(1.08) brightness(0.72) !important;
  opacity: 1 !important;
  transform: scale(1.03) !important;
}

.backdrop.has-video > img,
.app.is-webtv .backdrop.has-video > img {
  opacity: 0 !important;
}

.app.is-echo-show .backdrop > img,
.app.is-echo-show .backdrop.has-video > img {
  visibility: visible !important;
  filter: saturate(1.08) brightness(0.72) !important;
  opacity: 1 !important;
  transform: scale(1.03) !important;
}

.backdrop::after,
.backdrop.has-video::after,
.app.is-webtv .backdrop::after,
.app.is-echo-show .backdrop::after,
.app.is-echo-show.is-webtv .backdrop::after {
  background: rgba(0, 0, 0, 0.5) !important;
}

@media (max-width: 820px) {
  .dock,
  .topbarLeft,
  .topbarActions {
    transition:
      opacity 220ms ease,
      transform 300ms cubic-bezier(0.22, 0.8, 0.25, 1);
  }

  .app[data-playing="true"] .dock {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .app[data-playing="true"] .topbarLeft,
  .app[data-playing="true"] .topbarActions {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
  }

  .app[data-playing="true"] .coverWrap .playButton,
  .app[data-playing="true"].is-play-control-dismissed .coverWrap .playButton {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: auto !important;
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 820px) {
  .dockInner > .reactionItem {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 3;
    width: 46px;
    height: 46px;
    display: flex;
  }

  .reactionItem .reactionToggle {
    width: 46px;
    height: 46px;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(var(--surface-rgb), 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.11);
    -webkit-backdrop-filter: blur(24px) saturate(1.3);
    backdrop-filter: blur(24px) saturate(1.3);
  }

  .reactionItem .reactionGlyph {
    flex-basis: 32px;
    width: 32px;
    max-width: 32px;
    height: 32px;
    font-size: 1.6rem;
  }

  .reactionItem .dockLabel {
    display: none;
  }

  .reactionItem .reactionTray {
    right: 0;
    left: auto;
    bottom: calc(100% + 9px);
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) and (max-width: 720px) and (max-height: 720px) and (min-aspect-ratio: 9 / 10) and (max-aspect-ratio: 10 / 9) {
  .topbar,
  .dock,
  .dockRevealZone {
    display: none !important;
  }

  .programNotification,
  .programNotification[data-kind="track"] {
    top: 12px;
    right: 12px;
    left: auto;
    width: min(300px, calc(100vw - 24px));
  }

  .stage,
  .app.is-webtv .stage {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px;
    place-items: center;
  }

  .player,
  .app.is-webtv .player {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    width: min(420px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .coverWrap,
  .app.is-webtv .coverWrap {
    width: min(52vw, 40dvh, 220px);
    height: auto;
    aspect-ratio: 1;
    border-radius: 20px;
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.44),
      0 7px 22px rgba(0, 0, 0, 0.24),
      0 0 0 1px rgba(255, 255, 255, 0.14);
  }

  .cover,
  .coverWrap:hover .cover,
  .app.is-webtv .coverWrap:hover .cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }

  .playButton,
  .app.is-webtv .playButton,
  .app[data-playing="true"] .coverWrap .playButton,
  .app[data-playing="true"] .coverWrap:hover .playButton {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: auto;
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .playIcon {
    display: none !important;
  }

  .playButton:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.82);
    outline-offset: -5px;
  }

  .meta,
  .app.is-webtv .meta {
    position: static;
    display: block;
    width: min(100%, 410px);
    max-width: 100%;
    text-align: center;
    transform: none;
  }

  .nowPlaying,
  .app.is-webtv .nowPlaying {
    display: block;
    margin: 0 0 7px;
    color: var(--quiet);
    font-size: 0.7rem;
  }

  .meta h1,
  .app.is-webtv .meta h1 {
    display: -webkit-box;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    font-size: 1.55rem;
    line-height: 1.06;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .meta > #artist,
  .app.is-webtv .meta > #artist {
    max-width: 100%;
    margin: 8px 0 0;
    overflow: hidden;
    font-size: 0.96rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.68);
    white-space: nowrap;
  }

  .backdrop .videoBackdrop,
  .backdrop.has-video .videoBackdrop,
  .app.is-webtv .backdrop.has-video .videoBackdrop {
    display: none !important;
    opacity: 0 !important;
  }

  .backdrop > img,
  .backdrop.has-video > img,
  .app.is-webtv .backdrop.has-video > img {
    visibility: visible;
    filter: saturate(1.08) brightness(0.72);
    opacity: 1;
    transform: scale(1.03);
  }

  .backdrop::after,
  .backdrop.has-video::after,
  .app.is-webtv .backdrop.has-video::after {
    background: rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 820px) and (max-height: 560px) and (orientation: landscape) and (min-aspect-ratio: 6 / 5) {
  .dock,
  .app.is-webtv .dock {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 2px 8px max(3px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0;
    background: rgba(9, 10, 13, 0.92);
    box-shadow:
      0 -12px 30px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 1;
    pointer-events: auto;
    transform: none !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    backdrop-filter: blur(30px) saturate(1.4);
  }

  .dockInner {
    display: grid;
    grid-template-columns: repeat(var(--mobile-dock-items, 5), minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: 520px;
    height: 58px;
    margin: 0 auto;
  }

  .dockItem {
    display: none;
  }

  .dockTab,
  .historyTab {
    flex-direction: column;
    gap: 1px;
    width: 100%;
    min-width: 0;
    height: 58px;
    padding: 0;
    border-radius: 16px;
  }

  .dockGlyph {
    flex: 0 0 32px;
    flex-basis: 32px;
    width: 32px;
    max-width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .dockIcon {
    width: 20px;
    height: 20px;
  }

  .dockTab .dockLabel,
  .dockTab:not(.historyTab) .dockLabel {
    position: static;
    display: block;
    width: auto;
    max-width: 100%;
    height: 10px;
    overflow: hidden;
    clip: auto;
    font-size: 0.55rem;
    line-height: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobileLiveGlyph,
  .mobileLiveTab.is-current .dockGlyph,
  .mobileLiveTab.is-playing .dockGlyph {
    flex-basis: 44px;
    width: 44px;
    max-width: 44px;
    height: 44px;
    border-radius: 50%;
    transform: translateY(-1px);
  }
}

@media (max-width: 820px) {
  .app[data-playing="true"] .topbarLeft {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .app.is-webtv .dock,
  .app.is-webtv[data-playing="true"] .dock {
    visibility: hidden;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(calc(100% + env(safe-area-inset-bottom))) !important;
  }

  .app.is-webtv .player {
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 820px) {
  .dockInner > .reactionItem .reactionToggle {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .dockInner > .reactionItem .reactionGlyph {
    position: static;
    flex: 0 0 32px;
    width: 32px;
    max-width: 32px;
    height: 32px;
    margin: 0;
    transform: none;
  }

  .dockInner > .reactionItem .reactionToggle .dockLabel {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    display: block;
    width: 56px;
    max-width: none;
    height: 10px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.62);
    clip: auto;
    font-size: 0.55rem;
    line-height: 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
  }
}
