/* ============================================================
   Y&Music - Mobile Fullscreen Player (Apple Music iOS 18 Design)
   Cohesive frosted glass, proportional artwork, legible titles,
   and spacious, ergonomic iOS playback controls.
   ============================================================ */

@media (max-width: 768px), (hover: none) and (max-width: 1024px) {
  #fullscreenPlayerModal {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) clamp(18px, 5vw, 26px) calc(env(safe-area-inset-bottom, 0px) + 14px) clamp(18px, 5vw, 26px) !important;
    background: var(--aura-base, #07080c) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top-left-radius: 32px !important;
    border-top-right-radius: 32px !important;
    box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.85) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    z-index: 60000 !important;

    /* Apple Music iOS 18 Sheet Slide-Up Spring Animation */
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.46s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease, visibility 0.46s step-end !important;
    will-change: transform;
  }

  #fullscreenPlayerModal.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.46s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease, visibility 0s step-start !important;
  }

  /* Turbo Rocket Boost: Disable animations for max cooling/battery */
  html[data-rocket-boost="true"] #fullscreenPlayerModal {
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html[data-rocket-boost="true"] #fullscreenPlayerModal.open {
    transition: none !important;
    animation: none !important;
  }

  /* Apple Music iOS 18 Sheet Scaling (when Boost is OFF) */
  html:not([data-rocket-boost="true"]) .app-container {
    transition: transform 0.46s cubic-bezier(0.32, 0.72, 0, 1), border-radius 0.46s cubic-bezier(0.32, 0.72, 0, 1), filter 0.35s ease !important;
    transform-origin: top center;
  }

  html:not([data-rocket-boost="true"]) body.fs-player-open .app-container {
    transform: scale(0.92) translateY(-14px) !important;
    border-radius: 28px !important;
    overflow: hidden !important;
    pointer-events: none !important;
    filter: brightness(0.65) contrast(1.05) !important;
  }

  html:not([data-rocket-boost="true"]) body.fs-player-open {
    background: #000000 !important;
    overflow: hidden !important;
  }

  /* Living Fluid Aura Dynamic Ambient Backdrop */
  #fullscreenPlayerModal .living-aura-backdrop {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background: var(--aura-base, #07080c) !important;
    contain: paint !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-orb {
    display: block !important;
    position: absolute !important;
    border-radius: 50% !important;
    filter: blur(36px) !important;
    opacity: 0.82 !important;
    will-change: transform !important;
    pointer-events: none !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-orb-1 {
    display: block !important;
    width: clamp(280px, 85vw, 480px) !important;
    height: clamp(280px, 85vw, 480px) !important;
    top: -10% !important;
    left: -15% !important;
    background: radial-gradient(circle, var(--aura-c1, var(--accent-primary)) 0%, var(--aura-glow1, var(--accent-glass)) 45%, transparent 75%) !important;
    animation: auraOrbit1 8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-orb-2 {
    display: block !important;
    width: clamp(260px, 80vw, 450px) !important;
    height: clamp(260px, 80vw, 450px) !important;
    top: -10% !important;
    right: -15% !important;
    background: radial-gradient(circle, var(--aura-c2, #a855f7) 0%, var(--aura-glow2, rgba(168, 85, 247, 0.9)) 45%, transparent 75%) !important;
    animation: auraOrbit2 10s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-orb-3 {
    display: block !important;
    width: clamp(280px, 85vw, 480px) !important;
    height: clamp(280px, 85vw, 480px) !important;
    bottom: -10% !important;
    left: -15% !important;
    background: radial-gradient(circle, var(--aura-c3, #3b82f6) 0%, var(--aura-glow3, rgba(59, 130, 246, 0.9)) 45%, transparent 75%) !important;
    animation: auraOrbit3 9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-orb-4 {
    display: block !important;
    width: clamp(260px, 80vw, 450px) !important;
    height: clamp(260px, 80vw, 450px) !important;
    bottom: -15% !important;
    right: -15% !important;
    background: radial-gradient(circle, var(--aura-c4, #ec4899) 0%, var(--aura-glow4, rgba(236, 72, 153, 0.9)) 45%, transparent 75%) !important;
    animation: auraOrbit4 11s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate !important;
  }

  html:not([data-rocket-boost="true"]) #fullscreenPlayerModal .aura-blur-image {
    display: block !important;
    position: absolute !important;
    inset: -20% !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(35px) saturate(220%) brightness(0.85) !important;
    opacity: 0.72 !important;
    animation: auraImageDrift 12s ease-in-out infinite alternate !important;
    will-change: transform !important;
  }

  /* iOS 18 Sheet Swipe Grabber Pill */
  #fullscreenPlayerModal .fs-grabber-pill {
    display: block !important;
    width: 38px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.28) !important;
    margin: 0 auto 8px auto !important;
    flex-shrink: 0 !important;
  }

  /* Fullscreen Header */
  #fullscreenPlayerModal .fullscreen-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 400px !important;
    min-height: 40px !important;
    margin: 0 auto clamp(6px, 1.2vh, 12px) auto !important;
    padding: 0 2px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 2 !important;
  }

  #fullscreenPlayerModal .fs-header-side {
    width: 38px !important;
    z-index: 3 !important;
  }

  #fullscreenPlayerModal .fullscreen-header button {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    cursor: pointer !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease !important;
  }

  #fullscreenPlayerModal .fullscreen-header button:active {
    transform: scale(0.9) !important;
    background: rgba(255, 255, 255, 0.18) !important;
  }

  #fullscreenPlayerModal .fullscreen-title-heading {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    max-width: calc(100% - 90px) !important;
    padding: 0 4px !important;
    pointer-events: none !important;
    z-index: 2 !important;
  }

  #fullscreenPlayerModal .fs-header-sub {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.45) !important;
    line-height: 1.2 !important;
  }

  #fullscreenPlayerModal .fs-header-main {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  /* Grid Container */
  #fullscreenPlayerModal .fullscreen-content-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Main Artwork Column: fills vertical space gracefully */
  #fullscreenPlayerModal .fullscreen-artwork-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  /* Artwork Area: centered with smooth responsive squircle */
  #fullscreenPlayerModal .fs-artwork-area {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(4px, 1.5vh, 16px) 0 !important;
    box-sizing: border-box !important;
  }

  #fullscreenPlayerModal .large-artwork-wrapper {
    width: min(82vw, 360px, 45dvh) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-height: 160px !important;
    margin: 0 auto !important;
    border-radius: clamp(20px, 5.5vw, 28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 20px 50px -8px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.04) !important;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease !important;
    flex-shrink: 1 !important;
  }

  #fullscreenPlayerModal.is-paused .large-artwork-wrapper {
    transform: scale(0.88) !important;
    opacity: 0.88 !important;
  }

  #fullscreenPlayerModal .large-artwork-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: inherit !important;
    display: block !important;
  }

  /* Unified Controls Deck: balanced Apple Music spacing */
  #fullscreenPlayerModal .fs-controls-deck {
    width: 100% !important;
    max-width: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(12px, 2.2vh, 20px) !important;
    flex-shrink: 0 !important;
    padding: 0 4px clamp(4px, 1vh, 8px) 4px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 5000 !important;
  }

  /* Metadata Wrap: 2-line title wrapping, no truncated letters */
  #fullscreenPlayerModal .fullscreen-meta-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 12px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  #fullscreenPlayerModal .fullscreen-meta-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  #fullscreenPlayerModal .fullscreen-track-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-size: clamp(20px, 5.2vw, 24px) !important;
    font-weight: 750 !important;
    line-height: 1.22 !important;
    color: #ffffff !important;
    margin: 0 0 3px 0 !important;
    letter-spacing: -0.3px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4) !important;
  }

  #fullscreenPlayerModal .fullscreen-track-artist {
    font-size: clamp(14px, 3.8vw, 16px) !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.68) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
    margin: 0 !important;
  }

  #fullscreenPlayerModal .fs-meta-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 5001 !important;
  }

  #fullscreenPlayerModal .fs-like-heart,
  #fullscreenPlayerModal .fs-more-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.82) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease !important;
  }

  #fullscreenPlayerModal .fs-like-heart:active,
  #fullscreenPlayerModal .fs-more-btn:active {
    transform: scale(0.88) !important;
    background: rgba(255, 255, 255, 0.18) !important;
  }

  #fullscreenPlayerModal .fs-like-heart.liked {
    color: var(--accent-primary, #ff3659) !important;
    background: var(--accent-glass, rgba(255, 54, 89, 0.18)) !important;
    border-color: var(--glass-border-accent, rgba(255, 54, 89, 0.35)) !important;
    box-shadow: 0 0 14px var(--accent-glow, rgba(255, 54, 89, 0.4)) !important;
  }

  /* Playback Bar (Scrubber) */
  #fullscreenPlayerModal .fs-playback-bar {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  #fullscreenPlayerModal .progress-track {
    width: 100% !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 999px !important;
    position: relative !important;
    cursor: pointer !important;
    touch-action: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  }

  #fullscreenPlayerModal .progress-track::before {
    content: "" !important;
    position: absolute !important;
    top: -20px !important;
    bottom: -20px !important;
    left: -8px !important;
    right: -8px !important;
    cursor: pointer !important;
    z-index: 10 !important;
  }

  #fullscreenPlayerModal .progress-fill {
    height: 100% !important;
    background: var(--accent-gradient, linear-gradient(135deg, #dfb76c, #f3d79b)) !important;
    border-radius: 999px !important;
    position: relative !important;
    box-shadow: 0 0 12px var(--accent-glow, rgba(223, 183, 108, 0.4)) !important;
  }

  #fullscreenPlayerModal .progress-handle {
    width: 16px !important;
    height: 16px !important;
    right: -8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #ffffff !important;
    border: 2px solid var(--accent-primary, #dfb76c) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 255, 255, 0.8) !important;
    position: absolute !important;
    opacity: 1 !important;
  }

  #fullscreenPlayerModal .fs-time-row {
    display: flex !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
  }

  #fullscreenPlayerModal .fs-time-row .time-label {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
    color: rgba(255, 255, 255, 0.55) !important;
  }

  /* Spacious, Single-Row Apple Music Controls */
  #fullscreenPlayerModal .fs-controls-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 2px 4px !important;
    box-sizing: border-box !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
  }

  /* Reset grid areas if previously applied */
  #fsShuffleBtn, #fsPrevBtn, #fsRewind10Btn,
  #fsPlayPauseBtn, #fsForward10Btn, #fsNextBtn, #fsRepeatBtn {
    grid-area: auto !important;
  }

  /* Main Hero Play/Pause Circle (Theme Accent Adaptive) */
  #fullscreenPlayerModal .fs-play-pause-btn {
    width: clamp(64px, 17vw, 74px) !important;
    height: clamp(64px, 17vw, 74px) !important;
    min-width: clamp(64px, 17vw, 74px) !important;
    min-height: clamp(64px, 17vw, 74px) !important;
    font-size: clamp(23px, 6vw, 27px) !important;
    border-radius: 50% !important;
    background: var(--accent-gradient, linear-gradient(135deg, #dfb76c, #f3d79b)) !important;
    color: var(--accent-contrast, #08080a) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 20px var(--accent-glow, rgba(223, 183, 108, 0.45)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease !important;
  }

  #fullscreenPlayerModal .fs-play-pause-btn:active {
    transform: scale(0.91) !important;
    filter: brightness(0.95) !important;
  }

  /* Previous & Next Buttons */
  #fullscreenPlayerModal .fs-step-btn {
    width: clamp(40px, 10.5vw, 46px) !important;
    height: clamp(40px, 10.5vw, 46px) !important;
    min-width: clamp(40px, 10.5vw, 46px) !important;
    font-size: clamp(20px, 5.2vw, 23px) !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease !important;
  }

  #fullscreenPlayerModal .fs-step-btn:active {
    transform: scale(0.85) !important;
    opacity: 0.6 !important;
  }

  /* Seek 10s Buttons */
  #fullscreenPlayerModal .fs-seek-btn {
    width: clamp(34px, 8.8vw, 38px) !important;
    height: clamp(34px, 8.8vw, 38px) !important;
    min-width: clamp(34px, 8.8vw, 38px) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease !important;
  }

  #fullscreenPlayerModal .fs-seek-btn:active {
    transform: scale(0.85) !important;
    color: #ffffff !important;
  }

  #fullscreenPlayerModal .fs-seek-svg {
    width: clamp(22px, 5.8vw, 25px) !important;
    height: clamp(22px, 5.8vw, 25px) !important;
  }

  /* Smart Shuffle & Repeat Buttons */
  #fullscreenPlayerModal .fs-sub-btn {
    width: clamp(34px, 8.8vw, 38px) !important;
    height: clamp(34px, 8.8vw, 38px) !important;
    min-width: clamp(34px, 8.8vw, 38px) !important;
    font-size: clamp(16px, 4.2vw, 18px) !important;
    color: rgba(255, 255, 255, 0.55) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease !important;
  }

  #fullscreenPlayerModal .fs-sub-btn:active {
    transform: scale(0.85) !important;
  }

  #fullscreenPlayerModal .fs-sub-btn.active {
    color: var(--accent-primary, #ff3659) !important;
    filter: drop-shadow(0 0 6px var(--accent-glow, rgba(255, 54, 89, 0.5))) !important;
  }

  /* Hide physical hardware volume slider on mobile */
  #fullscreenPlayerModal .fs-tools-row {
    display: none !important;
  }

  /* Synchronized Karaoke Lyrics Mode */
  #fullscreenPlayerModal.show-lyrics .fullscreen-artwork-col {
    display: none !important;
  }

  #fullscreenPlayerModal.show-lyrics .fullscreen-lyrics-col {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    padding: 24px 18px !important;
    background: rgba(14, 16, 24, 0.75) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }

  /* More dropdown popup */
  #fullscreenPlayerModal .fs-more-dropdown {
    position: absolute !important;
    bottom: calc(100% + 12px) !important;
    top: auto !important;
    right: 0 !important;
    left: auto !important;
    width: 226px !important;
    max-width: calc(100vw - 32px) !important;
    background: rgba(18, 20, 30, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
    padding: 6px !important;
    z-index: 6000 !important;
  }
}

/* Extra Compact Mobile Screens (e.g. iPhone SE, height <= 700px) */
@media (max-width: 768px) and (max-height: 700px) {
  #fullscreenPlayerModal {
    padding: calc(env(safe-area-inset-top, 0px) + 6px) 18px calc(env(safe-area-inset-bottom, 0px) + 10px) 18px !important;
  }

  #fullscreenPlayerModal .fullscreen-header {
    min-height: 36px !important;
    margin-bottom: 4px !important;
  }

  #fullscreenPlayerModal .large-artwork-wrapper {
    width: min(72vw, 220px, 32dvh) !important;
    border-radius: 16px !important;
  }

  #fullscreenPlayerModal .fs-controls-deck {
    gap: 10px !important;
  }

  #fullscreenPlayerModal .fullscreen-track-title {
    font-size: 18px !important;
    margin-bottom: 2px !important;
  }

  #fullscreenPlayerModal .fs-play-pause-btn {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    font-size: 20px !important;
  }
}

/* Landscape Mode on Phones */
@media (max-height: 500px) and (max-width: 1024px) and (orientation: landscape) {
  #fullscreenPlayerModal {
    padding: 12px max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left)) !important;
    gap: 8px !important;
  }

  #fullscreenPlayerModal .fullscreen-content-grid {
    max-width: 840px !important;
  }

  #fullscreenPlayerModal .fullscreen-artwork-col {
    display: grid !important;
    grid-template-columns: minmax(120px, 1fr) minmax(260px, 1.2fr) !important;
    grid-template-rows: 1fr !important;
    gap: 28px !important;
    align-items: center !important;
  }

  #fullscreenPlayerModal .large-artwork-wrapper {
    width: min(100%, 60dvh) !important;
  }

  #fullscreenPlayerModal .fs-controls-deck {
    gap: 12px !important;
  }
}

/* Keep the shared Boost overrides after the phone and tablet themes. */
html[data-rocket-boost="true"] :is(
  .app-header, .bottom-player, .mobile-bottom-nav, .mobile-nav-search-btn,
  .user-dropdown-menu, .playlist-more-dropdown, .mobile-search-overlay,
  .home-celebration-banner, .home-disclaimer-banner, .home-mix-tag,
  .queue-sheet-backdrop, .modal-overlay
),
html[data-rocket-boost="true"] #fullscreenPlayerModal :is(.fullscreen-lyrics-col, .fs-more-dropdown),
html[data-rocket-boost="true"] #coverStudioModal .cover-studio-modal-box {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-rocket-boost="true"] :is(.app-header, .bottom-player, .mobile-bottom-nav, .mobile-nav-search-btn) {
  background: var(--bg-main, #0d0b0d) !important;
  box-shadow: none !important;
}

html[data-rocket-boost="true"] #fullscreenPlayerModal .living-aura-backdrop,
html[data-rocket-boost="true"] :is(.home-hero-music-bars, .home-welcome-art-glow) {
  display: none !important;
}

html[data-rocket-boost="true"] .home-mix-card::after,
html[data-rocket-boost="true"] .selected-album-card::before {
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

html[data-rocket-boost="true"] .hero-banner::before,
html[data-rocket-boost="true"] :is(.home-hero-eyebrow-dot, .sounds-disc-badge i, .nwp-live-dot, .nwp-playing .nwp-eq i, .mini-eq-bar) {
  animation: none !important;
}

html[data-rocket-boost="true"] :is(.queue-sheet-overlay, .queue-sheet-panel, .modal-overlay, .modal-box),
html[data-rocket-boost="true"] #fullscreenPlayerModal :is(.fs-more-dropdown, .large-artwork-wrapper, .fs-meta-text) {
  transition: none !important;
  will-change: auto !important;
}

#fullscreenPlayerModal .fs-more-item,
#addToPlaylistModal :is(button, .playlist-picker-row) {
  touch-action: manipulation;
}
