/* V11.47: presentation only. Existing audio and controls stay mounted. */
#mobilePlayerToggle { display:none; }
@media (max-width:820px) {
 body.gatto-mini-player:not(.chat-view-active):not(.gatto-player-expanded) { --player:80px!important; --player-safe:calc(80px + env(safe-area-inset-bottom,0px))!important; }
 body.gatto-mini-player #app > .player-bar #mobilePlayerToggle {display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;border:0;border-radius:12px;background:transparent;color:inherit;font-size:22px;cursor:pointer;}
 body.gatto-mini-player.gatto-player-expanded #mobilePlayerToggle {position:absolute;right:8px;top:-46px;background:#242033;border:1px solid #645375;}
 body.gatto-mini-player #mobilePlayerToggle:focus-visible {outline:2px solid #c896ff;outline-offset:2px;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar {
 height:calc(80px + env(safe-area-inset-bottom,0px))!important;min-height:0!important;padding:8px 8px calc(16px + env(safe-area-inset-bottom,0px))!important;
 display:grid!important;grid-template-columns:minmax(0,1fr) 88px 44px!important;grid-template-rows:56px!important;gap:0 2px!important;align-items:center!important;overflow:visible!important;
 }
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar .now-playing {grid-area:1/1!important;display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;gap:8px!important;min-width:0!important;padding:0!important;border:0!important;background:none!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #playerCoverDisc {width:44px!important;height:44px!important;min-width:44px!important;margin:0!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #playerCover {width:100%!important;height:100%!important;object-fit:cover;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #nowPlayingInfo {min-width:0!important;padding:0!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #playerTitle {display:block;font-size:13px!important;line-height:18px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #playerArtist {display:block;font-size:11px!important;line-height:16px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar :is(.now-playing-actions,#persistentListControls,#queueTimeSummary,#audioSpectrum,.player-tools,#playerAlbum,#playerFolderOrigin,#playerSharedInfo,#shuffleButton,#previousButton,#repeatButton) {display:none!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar .transport {display:contents!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar .transport-buttons {position:static!important;grid-area:1/2!important;display:flex!important;gap:0!important;transform:none!important;margin:0!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar :is(#playButton,#nextButton) {width:44px!important;height:44px!important;min-width:44px!important;margin:0!important;font-size:20px!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #mobilePlayerToggle {grid-area:1/3!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar .timeline {position:absolute!important;left:12px!important;right:12px!important;bottom:env(safe-area-inset-bottom,0px)!important;height:16px!important;display:block!important;margin:0!important;padding:0!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar .timeline span {display:none!important;}
 body.gatto-mini-player:not(.gatto-player-expanded):not(.chat-footer-active) #app > .player-bar #progress {display:block!important;width:100%!important;height:16px!important;margin:0!important;}
 body.gatto-mini-player.chat-footer-active #mobilePlayerToggle {display:none!important;}
}

@media(max-width:820px){
 body.gatto-mini-player.gatto-player-expanded:not(.chat-view-active){--player:282px!important;--player-safe:calc(282px + env(safe-area-inset-bottom,0px))!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar{height:var(--player-safe)!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:56px 48px 36px 28px 44px!important;gap:8px!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))!important;overflow:visible!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .now-playing{grid-area:1/1!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .transport{display:contents!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .transport-buttons{position:static!important;grid-area:2/1!important;display:flex!important;justify-content:center!important;gap:12px!important;transform:none!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .transport-buttons .icon-button{display:inline-flex!important;align-items:center;justify-content:center;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #persistentListControls{position:static!important;grid-area:3/1!important;display:grid!important;grid-template-columns:1fr 1fr!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .timeline{position:static!important;grid-area:4/1!important;display:grid!important;grid-template-columns:40px minmax(0,1fr) 40px!important;width:100%!important;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .player-tools{grid-area:5/1!important;display:flex!important;justify-content:center;gap:8px;min-width:0;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #volume{width:72px!important;min-width:0;}
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar :is(#audioSpectrum,#queueTimeSummary){display:none!important;}
}

@media(max-width:820px){body.gatto-mini-player.gatto-player-expanded #app > .player-bar #mobilePlayerToggle{top:14px!important;right:8px!important;z-index:5;}body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .now-playing{padding-right:46px!important;}}

/* 11.47: reserve independent space for text, actions and collapse button. */
@media (max-width:820px) {
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .now-playing {
  display:grid!important;grid-template-columns:44px minmax(0,1fr) 132px!important;
  gap:6px!important;align-items:center!important;width:100%!important;min-width:0!important;
  box-sizing:border-box!important;padding:0 46px 0 0!important;margin:0!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #playerCoverDisc {
  width:44px!important;height:44px!important;min-width:0!important;margin:0!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #nowPlayingInfo {
  position:static!important;min-width:0!important;width:100%!important;max-width:100%!important;
  margin:0!important;padding:0!important;overflow:hidden!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #playerTitle {
  display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  white-space:normal!important;overflow:hidden!important;overflow-wrap:anywhere!important;
  font-size:13px!important;line-height:17px!important;max-height:34px!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar #playerArtist {
  display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  font-size:11px!important;line-height:16px!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .now-playing-actions {
  position:static!important;display:flex!important;gap:0!important;transform:none!important;
  width:132px!important;min-width:0!important;margin:0!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar .now-playing-actions .icon-button {
  width:44px!important;height:44px!important;min-width:44px!important;flex:0 0 44px!important;margin:0!important;
 }
 body.gatto-mini-player.gatto-player-expanded:not(.chat-footer-active) #app > .player-bar :is(#playerSharedInfo,#playerFolderOrigin,#playerAlbum) {display:none!important;}
}
