/* A complete player surface, with independently scrollable lyrics and queue. */
#playerSheet[open] {
  display: flex !important;
  flex-direction: column;
  position: fixed !important;
  inset: auto !important;
  left: 50% !important;
  top: calc((100dvh - var(--admob-banner-height, 0px)) / 2) !important;
  transform: translate(-50%, -50%) !important;
  width: min(1040px, calc(100vw - 48px)) !important;
  max-width: none !important;
  height: min(860px, calc(100dvh - 48px - var(--admob-banner-height, 0px))) !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 20px 28px 28px !important;
  border: 0 !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  background: #fff !important;
  color: #172138 !important;
  box-shadow: 0 24px 80px #17213824 !important;
}
#playerSheet .player-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  flex: 0 0 44px;
  width: 100%;
  margin-bottom: 12px;
}
#playerSheet .close-player {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #172138 !important;
}
#playerSheet .now-playing-label { margin: 0 !important; font-size: 13px !important; letter-spacing: 0; }
#playerSheet .player-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
#playerSheet .player-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  overflow-y: auto;
  scrollbar-width: thin;
}
#playerSheet .full-cover.cover-art {
  width: clamp(150px, 24dvh, 300px) !important;
  height: clamp(150px, 24dvh, 300px) !important;
  max-width: 70vw;
  flex: 0 0 auto;
  margin: 18px auto 24px !important;
  border-radius: 50% !important;
  background: #eef4ff !important;
}
#playerSheet .full-cover > svg { width: 42%; height: 42%; max-width: 112px; max-height: 112px; }
#playerSheet .full-meta {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 18px !important;
}
#playerSheet .full-meta > div { grid-column: 2; }
#playerSheet .full-meta h2 { font-size: clamp(21px, 2.6vw, 28px) !important; line-height: 1.3; overflow-wrap: anywhere; }
#playerSheet .full-meta p { margin-top: 8px; font-size: 12px; line-height: 1.6; color: #89909f; }
#playerSheet .full-meta .heart-button { width: 44px; height: 44px; font-size: 30px; }
#playerSheet .full-meta .heart-button.liked { color: #1457ff !important; }
#playerSheet .player-seek { flex: 0 0 auto; width: 100%; }
#playerSheet .full-progress { display: block; height: 32px; margin: 0; width: 100%; accent-color: #1457ff; touch-action: pan-y; }
#playerSheet .full-progress:disabled { opacity: .55; cursor: default; }
#playerSheet .time-row { margin-top: -3px; font-size: 11px; font-variant-numeric: tabular-nums; }
#playerSheet .full-controls { flex: 0 0 auto; gap: 8px; width: 100%; margin: 18px 0 10px !important; }
#playerSheet .full-controls > button { min-width: 44px; min-height: 48px; border-radius: 50%; }
#playerSheet .full-controls > button.active { color: #1457ff; background: #eef4ff; }
#playerSheet .full-controls .main-play { width: 68px !important; height: 68px !important; }
#playerSheet .player-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}
#playerSheet .player-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 4px;
  margin: 0;
  padding: 4px;
  background: #f3f5f9;
  border-radius: 15px;
}
#playerSheet .player-tab { min-height: 44px; padding: 10px; font-size: 13px; border-radius: 11px; }
#playerSheet .player-tab.active { color: #172138; background: #fff; }
#playerSheet .player-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 1px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #dce3ef transparent;
  -webkit-overflow-scrolling: touch;
}
#playerSheet .up-next-heading { padding: 0 10px; margin-bottom: 12px; }
#playerSheet .up-next-heading strong { font-size: 12px; font-weight: 600; color: #8a92a1; }
#playerSheet .up-next-heading small { font-size: 11px; }
#playerSheet .up-next-item {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 60px;
  padding: 10px;
  border-bottom: 1px solid #f0f3f8;
  border-radius: 0;
  background: #fff;
}
#playerSheet .up-next-item strong { font-size: 13px; font-weight: 600; line-height: 1.45; }
#playerSheet .up-next-item small { font-size: 11px; font-variant-numeric: tabular-nums; }
#playerSheet .up-next-number { font-size: 11px; }
#playerSheet .up-next-item.current-track { background: #f3f7ff; border-color: transparent; border-radius: 12px; margin-bottom: 4px; color: #1457ff; }
#playerSheet .queue-track-copy { display: grid; min-width: 0; gap: 4px; }
#playerSheet .queue-track-copy > span { font-size: 10px; color: #6485c8; }
#playerSheet .queue-playing-mark { display: grid; place-items: center; }
#playerSheet .queue-playing-mark svg { width: 18px; height: 18px; }
#playerSheet .queue-more { display: block; width: 100%; min-height: 48px; margin-top: 14px; border: 1px solid #e8edf6; border-radius: 12px; background: #fff; color: #3563c9; font-size: 12px; cursor: pointer; }
#playerSheet .lyrics-heading { justify-content: flex-end; }
#playerSheet .lyrics-modes button { min-height: 40px; min-width: 52px; font-size: 11px; }
#playerSheet .lyrics-content { color: #596477; font-size: 15px; line-height: 2; padding: 12px 10px 24px; }
#playerSheet .lyrics-empty { min-height: 200px; align-content: center; gap: 6px; }
#playerSheet .lyrics-empty strong { font-size: 14px; }
#playerSheet .lyrics-empty small { font-size: 12px; line-height: 1.6; }
#playerSheet button:focus-visible, #playerSheet input:focus-visible, #playerSheet [tabindex]:focus-visible { outline: 2px solid #1457ff; outline-offset: 3px; }
#mobileSearchButton svg, .account-avatar > svg { display: block; width: 21px; height: 21px; }

@media (max-width: 1100px), (orientation: portrait) {
  #playerSheet[open] {
    inset: 0 0 auto !important;
    transform: none !important;
    width: 100% !important;
    height: calc(100dvh - var(--admob-banner-height, 0px)) !important;
    padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
@media (orientation: portrait), (max-width: 599px) {
  #playerSheet .player-body { display: flex; flex-direction: column; gap: 24px; }
  #playerSheet .player-main { flex: 0 0 auto; overflow: visible; }
  #playerSheet .player-details { flex: 1 1 auto; }
  #playerSheet .full-cover.cover-art { margin: 12px auto 24px !important; }
}
@media (orientation: portrait) and (max-height: 740px), (max-width: 599px) and (max-height: 740px) {
  #playerSheet[open] { overflow-y: auto !important; }
  #playerSheet .player-body { flex: 0 0 auto; }
  #playerSheet .player-details { flex: 0 0 300px; min-height: 300px; }
  #playerSheet .full-cover.cover-art { width: 150px !important; height: 150px !important; margin: 4px auto 16px !important; }
  #playerSheet .full-meta { margin-bottom: 10px !important; }
  #playerSheet .full-controls { margin: 10px 0 0 !important; }
}
@media (orientation: landscape) and (min-width: 600px) {
  #playerSheet .player-details { padding-top: 12px; }
  #playerSheet .full-cover.cover-art { width: clamp(110px, 28dvh, 280px) !important; height: clamp(110px, 28dvh, 280px) !important; }
}
@media (orientation: landscape) and (max-height: 600px) and (min-width: 600px) {
  #playerSheet[open] { padding-top: max(4px, env(safe-area-inset-top)) !important; padding-bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  #playerSheet .player-header { margin-bottom: 4px; }
  #playerSheet .player-body { gap: 24px; }
  #playerSheet .player-main { justify-content: flex-start; }
  #playerSheet .full-cover.cover-art { width: 110px !important; height: 110px !important; margin: 0 auto 10px !important; }
  #playerSheet .full-meta { grid-template-columns: 0 minmax(0, 1fr) 44px; margin-bottom: 4px !important; }
  #playerSheet .full-meta h2 { font-size: 19px !important; }
  #playerSheet .full-meta p { font-size: 10px; margin-top: 4px; }
  #playerSheet .full-controls { margin: 8px 0 0 !important; }
  #playerSheet .full-controls .main-play { width: 52px !important; height: 52px !important; }
}

/* Keep the mini player clear of device insets and optional native banners. */
.bottom-nav { bottom: var(--admob-banner-height, 0px) !important; height: calc(70px + env(safe-area-inset-bottom)) !important; padding-bottom: env(safe-area-inset-bottom) !important; }
.mini-player { bottom: calc(80px + env(safe-area-inset-bottom) + var(--admob-banner-height, 0px)) !important; }
