/* Lennon Music v1.1.5 — mobile player dock.
   Keep the desktop island unchanged. On narrow screens, the player docks flush
   against the fixed bottom navigation and the transport controls never shrink. */
@media (max-width: 760px) {
  :root {
    --lm-mobile-navigation-height: calc(68px + env(safe-area-inset-bottom, 0px));
    --lm-mobile-player-height: 132px;
  }

  /* One shared measurement for both fixed surfaces avoids a visible gap even
     on devices with a home-indicator safe area. */
  .mobile-bottom-nav {
    height: var(--lm-mobile-navigation-height) !important;
    min-height: var(--lm-mobile-navigation-height) !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    z-index: 105 !important;
  }

  #global-player.player {
    --island-bottom: var(--lm-mobile-navigation-height);
    position: fixed;
    inset: auto 0 var(--lm-mobile-navigation-height) 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: var(--lm-mobile-player-height) !important;
    min-height: var(--lm-mobile-player-height) !important;
    box-sizing: border-box;
    padding: 13px 14px 18px !important;
    margin: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 51px 47px;
    gap: 2px !important;
    align-content: center;
    align-items: center;
    border: 0 !important;
    border-top: 1px solid #474b52 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg, #202229, #17191f) !important;
    box-shadow: 0 -9px 25px rgba(0,0,0,.27) !important;
    transform: translateY(calc(100% + 24px));
    z-index: 100;
  }

  #global-player.player::before {
    border-radius: 0 !important;
  }

  #global-player.player.is-visible {
    transform: translateY(0);
    animation: lm115-dock-in .27s cubic-bezier(.2,.75,.25,1) both !important;
  }
  #global-player.player.is-closing {
    animation: lm115-dock-out .27s ease-in both !important;
    pointer-events: none !important;
  }

  /* Full-width metadata row; keep room for mute and dismiss in the left end. */
  #global-player .player-song {
    grid-row: 1;
    min-width: 0;
    width: auto;
    margin-left: 75px;
    gap: 10px;
    display: flex;
    align-items: center;
  }
  #global-player .player-art {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    border-radius: 9px !important;
    overflow: hidden;
  }
  #global-player .player-cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #global-player .player-info {
    min-width: 0;
    flex: 1 1 auto;
  }
  #global-player .player-info strong {
    font-size: 13px !important;
    line-height: 1.5;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #global-player .player-info small {
    display: block;
    font-size: 11px !important;
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #global-player .player-heart {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    margin: 0 !important;
  }
  #global-player #player-close {
    position: absolute !important;
    left: 10px !important;
    top: 19px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  /* Dedicated transport row instead of squeezing buttons into the song row. */
  #global-player .player-center {
    grid-row: 2;
    width: 100% !important;
    min-width: 0;
    justify-self: stretch !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #global-player .player-buttons {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
  }
  #global-player .player-buttons button {
    box-sizing: border-box;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    flex-shrink: 0 !important;
    line-height: 1;
  }
  #global-player #player-next,
  #global-player #player-prev {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    background: rgba(255,255,255,.07) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 12px !important;
    color: #ebedf2 !important;
  }
  #global-player #player-toggle.player-main {
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    flex: 0 0 50px !important;
    border-radius: 14px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,.2) !important;
  }
  #global-player #player-next :is(i,svg),
  #global-player #player-prev :is(i,svg) {
    display: block;
    width: 19px !important;
    height: 19px !important;
    font-size: 19px !important;
  }
  #global-player #player-toggle :is(i,svg) {
    display: block;
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
  }

  /* Keep playback modes usable without taking width from the main 3 buttons. */
  #global-player .player-extras,
  #global-player .player-play-modes {
    display: contents !important;
  }
  #global-player #player-volume { display: none !important; }
  #global-player .player-mute {
    position: absolute;
    top: 20px;
    left: 48px;
    display: inline-flex !important;
    width: 31px !important;
    height: 31px !important;
    align-items: center;
    justify-content: center;
    border-radius: 9px !important;
    z-index: 2;
  }
  #global-player .player-mode-button {
    position: absolute;
    bottom: 23px;
    z-index: 2;
    display: inline-flex !important;
    width: 35px !important;
    height: 35px !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
  }
  #global-player #player-shuffle {right: 16px;}
  #global-player #player-repeat {left: 16px;}
  #global-player .player-mode-button :is(i,svg) {
    width: 16px !important;
    height: 16px !important;
  }

  /* A slim but touchable seekbar runs across the joined player/navigation seam. */
  #global-player .player-timeline {
    display: block !important;
    position: absolute !important;
    inset: auto 0 0 0 !important;
    width: 100%;
    height: 15px;
    margin: 0 !important;
    padding: 0;
    z-index: 4;
  }
  #global-player .player-timeline span {display:none !important;}
  #global-player #player-progress {
    display: block !important;
    width: 100% !important;
    height: 15px !important;
    min-height: 15px;
    margin: 0 !important;
    cursor: pointer;
    border-radius: 0 !important;
    background: linear-gradient(to right, #b4e982 var(--progress,0%), #4e535b var(--progress,0%)) center / 100% 3px no-repeat !important;
  }
  #global-player #player-progress::-webkit-slider-thumb {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
  }
  #global-player #player-progress::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
  }

  #global-player :is(button,input):focus-visible {
    outline: 2px solid var(--accent, #b4e982);
    outline-offset: 2px;
  }
  body.has-player .main-column {
    padding-bottom: calc(var(--lm-mobile-navigation-height) + var(--lm-mobile-player-height) + 24px) !important;
  }
}

@media (max-width: 360px) {
  /* Preserve the entire title and all 3 transport buttons at 320px. */
  #global-player .player-mute {display:none !important;}
  #global-player .player-song {margin-left: 37px; gap: 7px;}
  #global-player .player-buttons {gap: 13px !important;}
  #global-player #player-shuffle {right: 9px;}
  #global-player #player-repeat {left: 9px;}
}

@keyframes lm115-dock-in {
  from {opacity: 0;transform: translateY(16px)}
  to {opacity: 1;transform: translateY(0)}
}
@keyframes lm115-dock-out {
  from {opacity: 1;transform: translateY(0)}
  to {opacity: 0;transform: translateY(14px)}
}
@media (prefers-reduced-motion: reduce) {
  #global-player.player.is-visible,
  #global-player.player.is-closing {animation:none !important;transition:none !important;}
}
