/* MusicBook — SOLO móvil (≤767px): perfil estilo app (barra de iconos sobre la portada, flecha junto al nombre y hojas inferiores) */
@media (max-width:767px){
  /* En el perfil NO se ve la cabecera del menú: la portada llega hasta arriba */
  body:has(.mb-mmain[data-view="profile"]) .mb-mtop{display:none!important}
  body:has(.mb-mmain[data-view="profile"]){padding-top:0!important}

  /* Barra de iconos sobre la portada: menú · (lápiz) buscar · ··· */
  .mb-fbm .mb-cover{position:relative}
  .mb-pm-bar{position:absolute;top:0;left:0;right:0;z-index:6;display:flex;justify-content:space-between;align-items:flex-start;padding:calc(env(safe-area-inset-top,0px) + 8px) 6px 30px;background:linear-gradient(to bottom,rgba(0,0,0,.55),rgba(0,0,0,0));pointer-events:none}
  .mb-pm-r{display:flex;gap:2px}
  .mb-pm-b{pointer-events:auto;width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:50%;background:none;color:#fff;filter:drop-shadow(0 1px 2px rgba(0,0,0,.65));-webkit-tap-highlight-color:transparent;cursor:pointer}
  .mb-pm-b:active{background:rgba(255,255,255,.2)}

  /* Flecha junto al nombre (páginas y grupos del usuario) */
  .mb-fbm .mb-pname{position:relative}
  .mb-fbm .mb-pname>div{justify-content:center}
  .mb-fbm .mb-pname:has(.mb-pm-chev)>div{padding:0 44px}
  .mb-pm-chev{position:absolute;right:0;top:-2px;z-index:2;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(127,127,127,.22);color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .mb-pm-dot{position:absolute;top:-1px;right:-1px;width:12px;height:12px;border-radius:50%;background:#e11d48;border:2px solid var(--background,#fff)}

  /* Hojas inferiores (tarjetas que se despliegan desde abajo) */
  .mb-sh-bg{position:fixed;inset:0;z-index:260;background:rgba(0,0,0,.5);display:flex;align-items:flex-end;animation:mbShBg .2s ease-out}
  .mb-sh{width:100%;max-height:88vh;max-height:88dvh;display:flex;flex-direction:column;background:var(--background,#fff);color:var(--foreground,inherit);border-radius:18px 18px 0 0;box-shadow:0 -6px 30px rgba(0,0,0,.35);padding-bottom:env(safe-area-inset-bottom,0px);animation:mbShUp .26s cubic-bezier(.2,.8,.2,1);transition:transform .2s ease}
  .mb-sh-head{flex:0 0 auto;padding:8px 16px 2px;touch-action:none}
  .mb-sh-grip{display:block;width:40px;height:5px;border-radius:3px;background:rgba(127,127,127,.5);margin:0 auto 8px}
  .mb-sh-title{text-align:center;font-weight:800;font-size:17px;padding:2px 0 8px}
  .mb-sh-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 14px 18px}
  .mb-sh-sec{font-size:13px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted-foreground,#888);margin:16px 4px 4px}
  .mb-sh-row{display:flex;align-items:center;gap:14px;width:100%;padding:9px 6px;border:0;border-radius:10px;background:none;color:inherit;text-align:left;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
  button.mb-sh-row:active,label.mb-sh-row:active{background:rgba(127,127,127,.16)}
  .mb-sh-ic{flex:0 0 auto;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:rgba(127,127,127,.15)}
  .mb-sh-ic:has(>:not(svg)){width:auto;height:auto;background:none;border-radius:0}
  .mb-sh-tx{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
  .mb-sh-tx b{font-weight:600;font-size:16px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mb-sh-tx small{font-size:13px;line-height:1.3;color:var(--muted-foreground,#888)}
  .mb-sh-pill{flex:0 0 auto;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;background:rgba(127,127,127,.2)}
  .mb-sh-card{margin-top:6px;padding:4px 8px;border:1px solid rgba(127,127,127,.3);border-radius:14px}
  .mb-sh-ok{flex:0 0 auto;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#7c3aed;color:#fff}
  .mb-sh-empty{padding:6px 6px 8px;font-size:14px;color:var(--muted-foreground,#888)}
  .mb-sh-spin{flex:0 0 auto;width:18px;height:18px;border-radius:50%;border:2px solid rgba(127,127,127,.4);border-top-color:#7c3aed;animation:mbShSpin .8s linear infinite}
  /* formulario de edición dentro de la hoja: sin tarjeta propia ni título repetido */
  .mb-sh-form>.rounded-2xl{border:0!important;box-shadow:none!important;padding:0!important;background:transparent!important}
  .mb-sh-form>.rounded-2xl>div:first-child{display:none!important}
  @keyframes mbShBg{from{opacity:0}to{opacity:1}}
  @keyframes mbShUp{from{transform:translateY(100%)}to{transform:translateY(0)}}
  @keyframes mbShSpin{to{transform:rotate(360deg)}}
}
