/* AI Project Universe V4.9 — mobile review music visibility */
@media (max-width: 760px) {
  .viewer[open] .viewer__bar > div:first-child {
    max-width: calc(100% - 98px) !important;
  }

  .viewer[open] .viewer__actions {
    display: flex !important;
    flex: 0 0 90px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    gap: 6px !important;
  }

  .viewer[open] #viewerMusic {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 38px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 2px solid #0a0a0a !important;
    border-radius: 12px !important;
    background: #dadada !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 1 !important;
    box-shadow: 2px 2px 0 #0a0a0a !important;
  }

  .viewer[open] #viewerMusic::before {
    content: "♫";
    color: #0a0a0a;
    font-size: 20px;
    font-weight: 1000;
    line-height: 1;
  }

  .viewer[open] #viewerMusic.is-playing::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7f7f7f;
    box-shadow: 0 0 0 2px #fff;
  }

  .viewer[open] #viewerClose {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }

  .despacito-player {
    left: max(8px, env(safe-area-inset-left)) !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    padding: 8px 9px !important;
    border-width: 2px !important;
    border-radius: 14px !important;
    box-shadow: 4px 4px 0 #0a0a0a !important;
  }

  .despacito-player__head {
    min-height: 34px !important;
    padding: 0 !important;
  }

  .despacito-player__head small { font-size: 7px !important; }
  .despacito-player__head strong { font-size: 11px !important; }
  .despacito-player__close {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
  }

  .despacito-player__media {
    position: fixed !important;
    left: -230px !important;
    top: 0 !important;
    width: 200px !important;
    min-width: 200px !important;
    height: 200px !important;
    min-height: 200px !important;
    opacity: .01 !important;
    pointer-events: none !important;
    border: 0 !important;
  }

  .despacito-player__mount,
  .despacito-player__mount iframe {
    width: 200px !important;
    min-width: 200px !important;
    height: 200px !important;
    min-height: 200px !important;
  }

  .despacito-player__foot {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 5px 0 0 !important;
    font-size: 8px !important;
  }

  .despacito-player__foot a { display: none !important; }

  .despacito-player__start {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    grid-column: 1 / -1 !important;
    margin-top: 2px !important;
    padding: 9px 10px !important;
    border-width: 2px !important;
    border-radius: 9px !important;
    box-shadow: 2px 2px 0 #0a0a0a !important;
    font-size: 10px !important;
    pointer-events: auto !important;
  }

  .despacito-player__start:hover,
  .despacito-player__start:focus-visible {
    transform: none !important;
  }

  body.viewer-open .despacito-player {
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }
}

/* V5.0: keep the sound-unlock control reachable above the project iframe. */
@media (max-width:760px) {
  .despacito-player { z-index:2147483000 !important; }
  .despacito-player__start:not([hidden]) {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:44px !important;
    background:#dadada !important;
    color:#0a0a0a !important;
    font-weight:1000 !important;
  }
  .despacito-player [data-music-status][data-state="blocked"] {
    color:#363636 !important;
    font-weight:900 !important;
  }
}
